diff --git "a/data/dublin_data_train.jsonl" "b/data/dublin_data_train.jsonl" --- "a/data/dublin_data_train.jsonl" +++ "b/data/dublin_data_train.jsonl" @@ -1,6117 +1,8048 @@ -{"submission_id":15210,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-11-09 04:04:22","func_code":"def reverse(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[len(a) - i - 1])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":30147,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-11-09 11:26:49","func_code":"def reverse(a):\n i = 0\n b = []\n while i < len(a):\n b.append(a[len(a) - 1 - i])\n i += 1\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":9559,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-11-09 11:28:01","func_code":"def reverse(a):\n i = 0\n b = []\n while i < len(a):\n b.append(a[len(a) - 1 - i])\n i += 1\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":28315,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-11-09 11:44:09","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n print(a[len(a) - i - 1])\n i = i + 1","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":36245,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-11-09 11:44:09","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n print(a[len(a) - i - 1])\n i = i + 1","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":31526,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-11-09 12:08:51","func_code":"def reverse(a):\n b = []\n while len(a) != 0:\n b.append(a.pop())\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":41886,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2016-11-09 15:51:30","func_code":"def reverse(lines):\n import sys\n lines = sys.stdin.readlines()\n return lines","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":8463,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-11-11 14:19:49","func_code":"def reverse(test):\n b = []\n i = 0\n while i < len(test):\n b.append(test[len(test) - 1 - i])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":28470,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-11-11 14:19:49","func_code":"def reverse(test):\n b = []\n i = 0\n while i < len(test):\n b.append(test[len(test) - 1 - i])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":9321,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 18:52:10","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n return a[::-1]\n i = i + 1","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":30688,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2016-12-01 14:08:15","func_code":"def reverse(a):\n i = 0\n tmp = ''\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2015,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":13565,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2016-12-01 14:23:41","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j += 1\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":13352,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2016-12-01 14:23:41","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j += 1\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23622,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2016-12-01 16:07:37","func_code":"def swapi(a, i, j):\n if a[j] < a[i]:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n j = i\n while j < len(a):\n swapi(a, i, j)\n j += 1\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":3205,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2016-12-01 16:07:37","func_code":"def swapi(a, i, j):\n if a[j] < a[i]:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n j = i\n while j < len(a):\n swapi(a, i, j)\n j += 1\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10374,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2016-12-03 15:54:29","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":37547,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2016-12-03 15:54:29","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":40460,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2016-12-04 09:44:21","func_code":"def reverse(a):\n return a.reverse()","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2015,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":1689,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2016-12-04 10:03:47","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10354,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2016-12-04 10:03:47","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8308,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-12-06 11:33:53","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":11391,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2016-12-06 13:55:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":38128,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2016-12-06 13:55:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":32728,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2016-12-06 13:55:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8466,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2016-12-06 14:00:41","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2015,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":7118,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2016-12-06 14:00:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":27458,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2016-12-06 14:00:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":11679,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2016-12-06 14:01:22","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":42468,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-12-06 14:02:21","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":6914,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-12-06 14:02:21","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22913,"user":"4733f087-f7f5-4b28-b898-9a23b2f59251","date":"2016-12-06 14:02:26","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":28731,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2016-12-06 14:04:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":27041,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2016-12-06 14:04:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":2928,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2016-12-06 14:05:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":412,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2016-12-06 14:05:30","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":33496,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2016-12-06 14:05:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = low + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":34996,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2016-12-06 14:06:11","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":12077,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2016-12-06 14:06:17","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":17222,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2016-12-06 14:06:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18358,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2016-12-06 14:06:45","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":19042,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2016-12-06 14:09:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":10126,"user":"fac2ee37-8224-43e0-9c23-7cc249889343","date":"2016-12-06 14:09:29","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":31107,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2016-12-06 14:09:48","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":5395,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2016-12-06 14:10:23","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1360,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2016-12-06 14:10:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8781,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2016-12-06 14:11:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":32506,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2016-12-06 14:11:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":29479,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2016-12-06 14:12:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1409,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2016-12-06 14:13:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40542,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2016-12-06 14:13:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9352,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2016-12-06 14:14:30","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = low + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":42323,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2016-12-06 14:14:30","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":24002,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2016-12-06 14:15:05","func_code":"def selection_sort(a):\n i = 0\n while i < len(a) - 1:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":26273,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2016-12-06 14:15:05","func_code":"def selection_sort(a):\n i = 0\n while i < len(a) - 1:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":8057,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2016-12-06 14:16:12","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":4974,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2016-12-06 14:16:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":42009,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2016-12-06 14:17:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":33026,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2016-12-06 14:17:45","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":12519,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2016-12-06 14:18:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":39569,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2016-12-06 14:19:47","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":20233,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2016-12-06 14:19:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3600,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2016-12-06 14:21:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n mid = len(a) \/ 2\n while low < high:\n if q > a[mid]:\n low = mid + 1\n else:\n high = mid\n mid = (low + high) \/ 2\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":13532,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2016-12-06 14:21:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1622,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2016-12-06 14:23:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":28794,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2016-12-06 14:24:19","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":2127,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2016-12-06 14:24:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":13601,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2016-12-06 14:24:47","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":33295,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2016-12-06 14:25:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":23314,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2016-12-06 14:25:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":20667,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2016-12-06 14:25:16","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9715,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2016-12-06 14:27:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":24887,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2016-12-06 14:28:00","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9783,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2016-12-06 14:31:11","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":14283,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-12-06 14:32:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":16407,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2016-12-06 14:32:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":12196,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2016-12-06 14:33:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8678,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2016-12-06 14:33:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":30761,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2016-12-06 14:33:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/\/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":true} -{"submission_id":24312,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2016-12-06 14:38:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n i = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1856,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2016-12-06 14:38:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":5914,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2016-12-06 14:41:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":37931,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2016-12-06 14:44:34","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":7897,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2016-12-06 14:44:34","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":35122,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2016-12-06 14:46:03","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":10111,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2016-12-06 14:46:20","func_code":"def bsearch(a, q):\n start = 0\n end = len(a)\n while end > start:\n m = (start + end) \/ 2\n if a[m] < q:\n start = m + 1\n else:\n end = m\n return start","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":982,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2016-12-06 14:46:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":6975,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2016-12-06 14:46:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9414,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2016-12-06 14:48:23","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1284,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2016-12-06 14:56:21","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8502,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-12-06 15:01:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":35126,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-12-06 15:01:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":20112,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2016-12-06 15:05:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":33834,"user":"109505d5-be18-4a61-8318-5d522de4300e","date":"2016-12-06 15:07:51","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":27213,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2016-12-06 15:08:33","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":24170,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-12-06 15:16:59","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":41987,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2016-12-06 15:58:11","func_code":"def bsearch(a, q):\n start = 0\n end = len(a)\n while start < end:\n middle = (start + end) \/ 2\n if a[middle] < q:\n start = middle + 1\n else:\n end = middle\n return start","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":32545,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2016-12-06 16:13:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18354,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2016-12-06 16:13:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":30828,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-12-06 16:42:30","func_code":"def reverse(a):\n import sys\n a = sys.stdin.readlines()\n i = 0\n b = []\n while i < len(a):\n f = a[len(a) - i - 1]\n i = i + 1\n b.append(f.rstrip())\n print(b)\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":18264,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-12-06 16:42:30","func_code":"def reverse(a):\n import sys\n a = sys.stdin.readlines()\n i = 0\n b = []\n while i < len(a):\n f = a[len(a) - i - 1]\n i = i + 1\n b.append(f.rstrip())\n print(b)\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":25992,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2016-12-06 17:59:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":38601,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2016-12-06 18:30:21","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":2071,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-12-06 18:46:08","func_code":"def reverse(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[len(a) - 1 - i])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":22110,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2016-12-06 18:47:24","func_code":"def reverse(a):\n i = len(a) - 1\n b = []\n while i >= 0:\n b.append(a[i])\n i -= 1\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2015,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":23196,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-12-07 18:15:49","func_code":"def swap(a, i, p):\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n\n\ndef findsmall(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = findsmall(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35586,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-12-07 18:15:49","func_code":"def swap(a, i, p):\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n\n\ndef findsmall(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = findsmall(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14815,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2016-12-07 23:02:16","func_code":"def reverse(a):\n n = len(a)\n i = 0\n while i < n \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2015,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":18400,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2016-12-07 23:44:51","func_code":"def selection_sort(a):\n i = 0\n n = len(a)\n while i < n:\n p = i\n j = i + 1\n while j < n:\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":24685,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2016-12-07 23:44:51","func_code":"def selection_sort(a):\n i = 0\n n = len(a)\n while i < n:\n p = i\n j = i + 1\n while j < n:\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":16534,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2016-12-08 11:38:49","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2015,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":35292,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2016-12-08 13:26:29","func_code":"def selection_sort(a):\n i = 0\n j = 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n if i != 0:\n i -= 1\n j -= 1\n else:\n i += 1\n j += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":40998,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2016-12-08 13:26:29","func_code":"def selection_sort(a):\n i = 0\n j = 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n if i != 0:\n i -= 1\n j -= 1\n else:\n i += 1\n j += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2015,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17911,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-12-10 18:24:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40609,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-12-10 18:24:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":38706,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-12-11 02:57:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":39203,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-12-12 16:38:09","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2015,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":4274,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2016-11-27 21:04:49","func_code":"def reverse(test):\n b = []\n i = 0\n while i < len(test):\n b.append(test[len(test) - 1 - i])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":26006,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-11-29 12:59:22","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - 1 - i\n t = a[i]\n a[i] = a[j]\n a[j] = t\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":34701,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-11-29 13:08:25","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":13209,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-11-29 13:08:25","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":18050,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2016-11-29 14:17:15","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n for i in range(len(a) \/ 2):\n swap(a, i, len(a) - i - 1)","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":7342,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2016-11-29 14:21:57","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":13138,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2016-11-29 14:22:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":14160,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2016-11-29 14:26:33","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":15046,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-29 14:27:09","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - 1 - i\n swap(a, i, j)\n i += 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":33571,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2016-11-29 14:27:15","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[p] >= a[j]:\n p = j\n j += 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27388,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2016-11-29 14:27:28","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":26032,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2016-11-29 14:27:28","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":23933,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2016-11-29 14:28:02","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":34429,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2016-11-29 14:28:15","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":31444,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2016-11-29 14:28:54","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":28962,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2016-11-29 14:29:13","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n for i in range(0, len(a) \/ 2):\n swap(a, i, len(a) - i - 1)","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":11591,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2016-11-29 14:30:09","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":22199,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2016-11-29 14:30:57","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":26843,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2016-11-29 14:30:59","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":7307,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2016-11-29 14:31:11","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":25710,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2016-11-29 14:31:45","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n for i in range(len(a)):\n smallest = i\n for j in range(i, len(a)):\n if a[j] < a[smallest]:\n smallest = j\n swap(a, i, smallest)\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28107,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2016-11-29 14:31:45","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n for i in range(len(a)):\n smallest = i\n for j in range(i, len(a)):\n if a[j] < a[smallest]:\n smallest = j\n swap(a, i, smallest)\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":18922,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2016-11-29 14:32:15","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":10091,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2016-11-29 14:32:44","func_code":"def swap(a, x, y):\n tmp = a[x]\n a[x] = a[y]\n a[y] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":15632,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2016-11-29 14:33:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":29120,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2016-11-29 14:33:06","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i += 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":37584,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2016-11-29 14:33:37","func_code":"def selection_sort(a):\n return a.sort()","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39681,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2016-11-29 14:33:37","func_code":"def selection_sort(a):\n return a.sort()","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":6636,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2016-11-29 14:34:00","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i += 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":4120,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2016-11-29 14:34:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":32626,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2016-11-29 14:35:11","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":19250,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2016-11-29 14:35:13","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":38767,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2016-11-29 14:35:48","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":3907,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2016-11-29 14:35:59","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":18263,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2016-11-29 14:35:59","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":3637,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2016-11-29 14:36:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":26583,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2016-11-29 14:37:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":3085,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2016-11-29 14:37:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":12622,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2016-11-29 14:38:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n b = 0\n while b < len(a) \/ 2:\n swap(a, b, len(a) - b - 1)\n b += 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":37498,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2016-11-29 14:38:33","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":24752,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2016-11-29 14:38:52","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i <= j:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":30321,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2016-11-29 14:39:00","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41493,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2016-11-29 14:39:48","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n k = 0\n while k < len(a) \/ 2:\n swap(a, k, len(a) - k - 1)\n k += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":27057,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2016-11-29 14:39:59","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":10361,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2016-11-29 14:40:17","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":35946,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2016-11-29 14:40:49","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":5588,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2016-11-29 14:40:49","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":40635,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2016-11-29 14:41:19","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":36406,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2016-11-29 14:41:19","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":24099,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2016-11-29 14:42:34","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":2589,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2016-11-29 14:42:49","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i += 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":27492,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2016-11-29 14:43:02","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":36316,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2016-11-29 14:43:07","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":15448,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2016-11-29 14:43:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":16134,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2016-11-29 14:44:00","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":18235,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2016-11-29 14:44:16","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":10776,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2016-11-29 14:44:22","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":656,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2016-11-29 14:44:22","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10707,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2016-11-29 14:44:25","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":5463,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2016-11-29 14:44:25","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":33482,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2016-11-29 14:44:58","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":19451,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2016-11-29 14:45:02","func_code":"def swap(a, x, y):\n tmp = a[x]\n a[x] = a[y]\n a[y] = tmp\n return a\n\n\ndef selection_sort(a):\n k = 0\n while k < len(a):\n j = k + 1\n p = k\n tmp = 0\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n swap(a, k, p)\n k += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":33860,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2016-11-29 14:45:02","func_code":"def swap(a, x, y):\n tmp = a[x]\n a[x] = a[y]\n a[y] = tmp\n return a\n\n\ndef selection_sort(a):\n k = 0\n while k < len(a):\n j = k + 1\n p = k\n tmp = 0\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n swap(a, k, p)\n k += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":7085,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-11-29 14:45:17","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":23953,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2016-11-29 14:45:38","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i += 1\n j -= 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":33526,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2016-11-29 14:45:57","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":36224,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2016-11-29 14:45:57","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":32966,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2016-11-29 14:46:02","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":9756,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2016-11-29 14:46:07","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":7021,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2016-11-29 14:46:07","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":38244,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2016-11-29 14:46:18","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":3695,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2016-11-29 14:46:39","func_code":"def selection_sort(a):\n for i in range(0, len(a)):\n p = i\n curr_low = p\n while p < len(a):\n if a[p] < a[curr_low]:\n curr_low = p\n p += 1\n tmp = a[i]\n a[i] = a[curr_low]\n a[curr_low] = tmp","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10833,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2016-11-29 14:46:39","func_code":"def selection_sort(a):\n for i in range(0, len(a)):\n p = i\n curr_low = p\n while p < len(a):\n if a[p] < a[curr_low]:\n curr_low = p\n p += 1\n tmp = a[i]\n a[i] = a[curr_low]\n a[curr_low] = tmp","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":15574,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2016-11-29 14:47:16","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":42010,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2016-11-29 14:47:22","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":23084,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2016-11-29 14:47:51","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":30811,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2016-11-29 14:48:29","func_code":"def selection_sort(a):\n p = 0\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":32508,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2016-11-29 14:48:29","func_code":"def selection_sort(a):\n p = 0\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":20268,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2016-11-29 14:49:10","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":18965,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2016-11-29 14:49:14","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":36703,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2016-11-29 14:49:14","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":29712,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-11-29 14:49:39","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":10975,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-11-29 14:49:39","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":42332,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2016-11-29 14:49:48","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":21473,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2016-11-29 14:50:37","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":18,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2016-11-29 14:50:37","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":37531,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2016-11-29 14:50:50","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14334,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2016-11-29 14:50:50","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":6744,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-11-29 14:51:03","func_code":"def selection_sort(a):\n i = 0\n while i < len(a) - 1:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14859,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2016-11-29 14:51:03","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":15208,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-11-29 14:51:03","func_code":"def selection_sort(a):\n i = 0\n while i < len(a) - 1:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23553,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2016-11-29 14:51:25","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":23778,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2016-11-29 14:51:25","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8246,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2016-11-29 14:53:07","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - i - 1\n swap(a, i, j)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":27445,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2016-11-29 14:53:09","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":566,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2016-11-29 14:53:09","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27721,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2016-11-29 14:53:11","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":1101,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2016-11-29 14:53:16","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":13267,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2016-11-29 14:53:29","func_code":"def reverse(a):\n i = 0\n j = -1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":33812,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2016-11-29 14:53:37","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":12290,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2016-11-29 14:53:37","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":20905,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2016-11-29 14:54:10","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n minimum = i\n while j < len(a):\n if a[j] < a[minimum]:\n minimum = j\n j += 1\n tmp = a[minimum]\n a[minimum] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":19785,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2016-11-29 14:54:10","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n minimum = i\n while j < len(a):\n if a[j] < a[minimum]:\n minimum = j\n j += 1\n tmp = a[minimum]\n a[minimum] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":16439,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2016-11-29 14:54:13","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":25593,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2016-11-29 14:54:17","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":40855,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2016-11-29 14:54:42","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":15888,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2016-11-29 14:54:42","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":4144,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2016-11-29 14:54:53","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8722,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2016-11-29 14:54:53","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":37925,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2016-11-29 14:55:32","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":7184,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2016-11-29 14:55:32","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":21522,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2016-11-29 14:55:33","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":7968,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2016-11-29 14:55:33","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23691,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2016-11-29 14:55:34","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":1938,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2016-11-29 14:55:34","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23881,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2016-11-29 14:55:39","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":38830,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2016-11-29 14:56:01","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":32270,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2016-11-29 14:56:01","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":28951,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2016-11-29 14:56:05","func_code":"def reverse(a):\n a.reverse()\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":19396,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2016-11-29 14:56:23","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":17185,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-29 14:56:29","func_code":"def find_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":2591,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-29 14:56:29","func_code":"def find_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":13004,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2016-11-29 14:56:35","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":18690,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2016-11-29 14:56:35","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":19471,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2016-11-29 14:56:48","func_code":"def selection_sort(a):\n p = 0\n j = 0\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":38865,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2016-11-29 14:56:48","func_code":"def selection_sort(a):\n p = 0\n j = 0\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":14103,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2016-11-29 14:56:58","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":12424,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-11-29 14:57:05","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":10237,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2016-11-29 14:57:14","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":4758,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2016-11-29 14:57:14","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8632,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2016-11-29 14:57:39","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":4376,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2016-11-29 14:58:20","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":40148,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2016-11-29 14:58:31","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":3331,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2016-11-29 14:58:31","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17936,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2016-11-29 14:59:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - 1 - i\n swap(a, i, j)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":35166,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-11-29 14:59:07","func_code":"def swap(a, i, j):\n a[i], a[j] = a[j], a[i]\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":7990,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2016-11-29 14:59:35","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":7482,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2016-11-29 14:59:35","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":15537,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-11-29 14:59:40","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i\n while j < len(a):\n if a[j] < a[i]:\n a[i], a[j] = a[j], a[i]\n j += 1\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20606,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-11-29 14:59:40","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i\n while j < len(a):\n if a[j] < a[i]:\n a[i], a[j] = a[j], a[i]\n j += 1\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":26646,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2016-11-29 14:59:45","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":3023,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2016-11-29 14:59:45","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17190,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2016-11-29 15:00:16","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":16187,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2016-11-29 15:01:04","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":27270,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2016-11-29 15:01:04","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17137,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2016-11-29 15:01:04","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":18906,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2016-11-29 15:01:34","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":37720,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2016-11-29 15:01:34","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":335,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2016-11-29 15:01:51","func_code":"def reverse(a):\n i = 0\n j = -1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":25145,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2016-11-29 15:06:27","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":35227,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2016-11-29 15:06:27","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":26476,"user":"4733f087-f7f5-4b28-b898-9a23b2f59251","date":"2016-11-29 15:06:39","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i <= j:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":36386,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2016-11-29 15:06:56","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":28344,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2016-11-29 15:07:01","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":18876,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2016-11-29 15:08:16","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25354,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2016-11-29 15:08:16","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":4626,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2016-11-29 15:09:03","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":14413,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2016-11-29 15:09:03","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":32902,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2016-11-29 15:09:47","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":40714,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2016-11-29 15:10:48","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":813,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2016-11-29 15:10:48","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":12257,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2016-11-29 15:11:41","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39988,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2016-11-29 15:11:41","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":29218,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2016-11-29 15:12:57","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33971,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2016-11-29 15:12:57","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":7877,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2016-11-29 15:13:16","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":31089,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2016-11-29 15:13:16","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23743,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2016-11-29 15:13:40","func_code":"def selection_sort(a):\n i = 0\n j = 1\n while i < len(a):\n j = i\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":2485,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2016-11-29 15:13:40","func_code":"def selection_sort(a):\n i = 0\n j = 1\n while i < len(a):\n j = i\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":19633,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2016-11-29 15:16:14","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27178,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2016-11-29 15:16:14","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10096,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2016-11-29 15:16:45","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":31303,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2016-11-29 15:17:43","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":14277,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2016-11-29 15:19:50","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":34201,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2016-11-29 15:19:50","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17974,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2016-11-29 15:21:18","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":11762,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2016-11-29 15:21:18","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":21013,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2016-11-29 15:21:18","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28885,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2016-11-29 15:21:18","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8952,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2016-11-29 15:21:34","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":9239,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2016-11-29 15:21:34","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":4956,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2016-11-29 15:21:43","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":32473,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2016-11-29 15:22:42","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":11275,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2016-11-29 15:22:42","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":9816,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2016-11-29 15:22:48","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n print(tmp)\n i += 1\n return tmp","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17995,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2016-11-29 15:22:48","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n print(tmp)\n i += 1\n return tmp","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":40071,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2016-11-29 15:24:41","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":1071,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2016-11-29 15:25:31","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":9021,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2016-11-29 15:25:31","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":22997,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2016-11-29 15:25:43","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":8356,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2016-11-29 15:25:43","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":3084,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2016-11-29 15:25:46","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_smallest_value(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_value(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":6676,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2016-11-29 15:25:46","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_smallest_value(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_value(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":34650,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2016-11-29 15:26:34","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41835,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2016-11-29 15:26:34","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35761,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2016-11-29 15:26:35","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14386,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2016-11-29 15:27:36","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":1352,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2016-11-29 15:27:36","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":31404,"user":"621f49f9-6d90-49c2-ada6-2cb48080552a","date":"2016-11-29 15:31:40","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":11958,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2016-11-29 15:51:49","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i <= j:\n swap(a, i, j)\n i += 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":27266,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2016-11-29 15:52:09","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38052,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2016-11-29 15:52:09","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33145,"user":"621f49f9-6d90-49c2-ada6-2cb48080552a","date":"2016-11-29 15:52:17","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":41579,"user":"621f49f9-6d90-49c2-ada6-2cb48080552a","date":"2016-11-29 15:52:17","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":26708,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2016-11-29 15:53:23","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":17067,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2016-11-29 15:53:32","func_code":"def smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":15753,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2016-11-29 15:53:32","func_code":"def smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":27343,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2016-11-29 15:54:40","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23043,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2016-11-29 15:54:40","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25363,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2016-11-29 17:50:08","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25952,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-11-29 21:40:44","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, len(a) - 1 - i, i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":33556,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-11-29 21:42:54","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":30550,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-11-29 21:42:54","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":751,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-30 17:30:32","func_code":"def swap(a, i, p):\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n\n\ndef findsmallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = findsmallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":7564,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-30 17:30:32","func_code":"def swap(a, i, p):\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n\n\ndef findsmallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = findsmallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":11945,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-03 13:20:26","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i != j:\n swap(a, i, j)\n i += 1\n j -= 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":31694,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-03 13:21:48","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2 - 1:\n swap(a, i, j)\n i += 1\n j -= 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":28558,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-03 13:22:44","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i += 1\n j -= 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":40445,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-03 13:22:44","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i += 1\n j -= 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":37973,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-03 13:51:22","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n temp = a[i]\n a[i] = a[p]\n a[p] = temp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":6912,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-03 13:51:22","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n temp = a[i]\n a[i] = a[p]\n a[p] = temp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":30026,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-01-09 19:36:57","func_code":"def reverse(list):\n reversed = []\n i = len(list) - 1\n while i >= 0:\n reversed.append(list[i])\n i = i - 1\n return reversed","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":25932,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-01-09 19:36:57","func_code":"def reverse(list):\n reversed = []\n i = len(list) - 1\n while i >= 0:\n reversed.append(list[i])\n i = i - 1\n return reversed","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":21648,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-14 11:19:28","func_code":"def find_smallest(a, i):\n p = i\n q = i + 1\n while q < len(a):\n if a[q] < a[p]:\n p = q\n q += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":5132,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-14 11:19:28","func_code":"def find_smallest(a, i):\n p = i\n q = i + 1\n while q < len(a):\n if a[q] < a[p]:\n p = q\n q += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39812,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-01-15 11:15:13","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":41838,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-01-15 11:15:13","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1293,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-01-15 12:04:05","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":28102,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-01-15 12:04:05","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":9853,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-01-16 05:18:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":17235,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-01-16 05:18:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":4984,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-01-16 05:18:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":27764,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-16 09:03:26","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":4944,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-16 09:04:22","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":38547,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-16 09:05:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":2764,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-16 09:05:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":28248,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-16 09:05:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":30143,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-01-21 16:46:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":266,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-01-21 16:46:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9079,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-02-24 11:11:03","func_code":"def swap_keys_values(d):\n return dict([(v, k) for k, v in list(d.items())])","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":1681,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-02-24 11:11:03","func_code":"def swap_keys_values(d):\n return dict([(v, k) for k, v in list(d.items())])","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":30791,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-02-24 11:11:37","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":36223,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-02-24 11:11:37","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":20046,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 11:51:46","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":11297,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 11:51:46","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":6316,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 11:55:28","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.values())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":19820,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:00:20","func_code":"def swap_keys_values(d):\n d2\n for key in d:\n d2[d[key]] = key\n return d2","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":20458,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:00:32","func_code":"def swap_keys_values(d):\n d2 = {}\n for key in d:\n d2[d[key]] = key\n return d2","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":38686,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:01:40","func_code":"def swap_keys_values(d):\n for key in d:\n d[key] = key\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":5117,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:01:40","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(d.values()):\n new_d[key] = value\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":29731,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:02:19","func_code":"def swap_keys_values(d):\n d2 = {}\n for key in d:\n d2[d[key]] = key\n return d2","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":32780,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:02:19","func_code":"def swap_keys_values(d):\n d2 = {}\n for key in d:\n d2[d[key]] = key\n return d2","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":3594,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:03:29","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n print(list(d.values()))\n for key, value in list(d.items()):\n print(value)\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":10303,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:04:16","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":35367,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:05:48","func_code":"def swap_keys_values(d):\n return {k: v for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":23700,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:06:08","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":23653,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:06:08","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":9979,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:06:11","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n for key in d:\n if d[key] in d2:\n del d2[d[key]]\n else:\n d2[d[key]] = key\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":24481,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:06:11","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n for key in d:\n if d[key] in d2:\n del d2[d[key]]\n else:\n d2[d[key]] = key\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":13510,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:06:11","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n for key in d:\n if d[key] in d2:\n del d2[d[key]]\n else:\n d2[d[key]] = key\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":5407,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:07:31","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if int(value) not in list(d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":18984,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-02-24 12:11:06","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":33199,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-02-24 12:11:06","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":36176,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:14:53","func_code":"def swap_unique_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":7594,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:15:33","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":28327,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-24 12:15:39","func_code":"def swap_keys_values():\n print({v: k for k, v in list(d.items())})","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":39388,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-24 12:16:05","func_code":"def swap_keys_values(k, v):\n print({v: k for k, v in list(d.items())})","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":31124,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:17:27","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) != 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":1977,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:18:05","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) != 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":20948,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:18:17","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":36935,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:18:17","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":39045,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:18:17","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":37271,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:24:24","func_code":"def swap_keys_values(d):\n return {(v, k) for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":2194,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:26:25","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":27085,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:26:25","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":9304,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:31:24","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":37521,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:31:24","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":12972,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 12:34:56","func_code":"def swap_keys_values(d):\n return {v: k for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":4424,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 12:35:21","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":18464,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 12:35:21","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":29580,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-24 12:35:37","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":22467,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-24 12:35:37","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":36217,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-02-24 12:35:39","func_code":"def swap_unique_keys_values(d):\n lst = [x for x in list(d.values())]\n new_dict = {v: k for k, v in list(d.items()) if lst.count(v) == 1}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":4538,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-02-24 12:35:39","func_code":"def swap_unique_keys_values(d):\n lst = [x for x in list(d.values())]\n new_dict = {v: k for k, v in list(d.items()) if lst.count(v) == 1}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":15010,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-02-24 12:35:39","func_code":"def swap_unique_keys_values(d):\n lst = [x for x in list(d.values())]\n new_dict = {v: k for k, v in list(d.items()) if lst.count(v) == 1}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":30709,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:36:49","func_code":"def swap_keys_values(d):\n return {v: k for k, v in d}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":1925,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:37:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in d}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":30511,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:38:15","func_code":"def swap_unique_keys_values(d):\n store = {}\n for key in d:\n for k in d:\n if d[key] == d[k]:\n 0\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":18140,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:38:32","func_code":"def swap_unique_keys_values(d):\n store = {}\n for key in d:\n for k in d:\n if d[key] == d[k]:\n continue\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":28117,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:38:58","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if d[key] == di[k]:\n continue\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":1171,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:39:10","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":35025,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:39:10","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":1864,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:39:46","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d[0:-1]:\n for k in di[1:]:\n if d[key] == di[k]:\n continue\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":14086,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:40:05","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d[0:len(d) - 1]:\n for k in di[1:]:\n if d[key] == di[k]:\n continue\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":21186,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:40:16","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if d[key] == di[k]:\n continue\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":38879,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:40:26","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if d.values.count(k) > 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37022,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:40:36","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if d.values.count(k) > 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":39869,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:40:43","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if d[key] == di[k]:\n 0\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8329,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2017-02-24 12:40:46","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":12147,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2017-02-24 12:40:46","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":35395,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:41:07","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if di[k] == d[key]:\n 0\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":38431,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:41:35","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if di[k] == d[key]:\n 0\n else:\n store[k] = d[k]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8284,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:41:42","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(k) > 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":33923,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:43:14","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if di[k] == d[key]:\n break\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":41936,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 12:43:55","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":7304,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:46:03","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(k) > 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":6803,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:46:41","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":34347,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:47:11","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(k) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":25566,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2017-02-24 12:47:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(my_dict.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":10434,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2017-02-24 12:47:43","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":17696,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2017-02-24 12:47:43","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":19078,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:47:48","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":35064,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:47:48","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":33221,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:47:48","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":41127,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-24 12:48:09","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.values())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":6378,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-02-24 12:48:35","func_code":"def swap_keys_values(dictionary):\n dictionary = {v: k for k, v in list(dictionary.items())}\n return dictionary","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":40492,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-02-24 12:48:35","func_code":"def swap_keys_values(dictionary):\n dictionary = {v: k for k, v in list(dictionary.items())}\n return dictionary","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":19021,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:49:13","func_code":"def swap_unique_keys_values(d):\n store = {}\n for k, v in list(d.items()):\n if d.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":15352,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-24 12:49:56","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":9680,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:50:15","func_code":"def swap_unique_keys_values(d):\n store = {}\n for k, v in list(d.items()):\n print(d.count(v))\n if d.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":1881,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:51:00","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(list(d.values()).count\n (k) >= 1)}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":6271,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-24 12:51:49","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n print(sorted(new_dict.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":20345,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-24 12:51:55","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":23373,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-24 12:51:55","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":16267,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-24 12:51:55","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32922,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:52:08","func_code":"def swap_unique_keys_values(d):\n store = {}\n print(list(d.values()))\n for k, v in list(d.items()):\n print(d.count(v))\n if d.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":40162,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:53:07","func_code":"def swap_unique_keys_values(d):\n store = {}\n for k, v in list(d.items()):\n if d.count(d.values) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":6554,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:53:23","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(list(d.values()).count\n (v) == 1)}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":7105,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:53:48","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":33520,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:53:48","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8270,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:53:48","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":92,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:53:59","func_code":"def swap_unique_keys_values(d):\n store = {}\n for k, v in list(d.items()):\n if d.values.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":2098,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2017-02-24 12:54:04","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":25676,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2017-02-24 12:54:04","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":40364,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2017-02-24 12:54:04","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":39090,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:54:15","func_code":"def swap_unique_keys_values(d):\n store = {}\n for k, v in list(d.items()):\n if list(d.values()).count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":10866,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-24 12:55:00","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":26170,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-24 12:55:00","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":28481,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-24 12:55:00","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":14350,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:55:04","func_code":"def swap_unique_keys_values(d):\n store = {}\n va = list(d.values())\n print(va)\n for k, v in list(d.items()):\n if va.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":24238,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:55:44","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":35644,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:55:44","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":38315,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:55:44","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":33848,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:56:08","func_code":"def swap_unique_keys_values(d):\n store = {}\n val = []\n va = list(d.values())\n for i in va:\n val = va.append(i)\n for k, v in list(d.items()):\n if va.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":28525,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:56:35","func_code":"def swap_unique_keys_values(d):\n store = {}\n val = []\n va = list(d.values())\n for i in va:\n val.append(i)\n for k, v in list(d.items()):\n if va.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":21708,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:56:47","func_code":"def swap_unique_keys_values(d):\n store = {}\n val = []\n va = list(d.values())\n for i in va:\n val.append(i)\n print(val)\n for k, v in list(d.items()):\n if va.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":26580,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:56:57","func_code":"def swap_unique_keys_values(d):\n store = {}\n val = []\n va = list(d.values())\n for i in va:\n val.append(i)\n print(val)\n for k, v in list(d.items()):\n if val.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":16687,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:57:08","func_code":"def swap_unique_keys_values(d):\n store = {}\n val = []\n va = list(d.values())\n for i in va:\n val.append(i)\n for k, v in list(d.items()):\n if val.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":39435,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:57:08","func_code":"def swap_unique_keys_values(d):\n store = {}\n val = []\n va = list(d.values())\n for i in va:\n val.append(i)\n for k, v in list(d.items()):\n if val.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":40824,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-02-24 12:58:08","func_code":"def swap_unique_keys_values(d):\n for pairs in zip(list(d.values()), list(d.items())):\n print(pairs)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":6988,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-02-24 13:06:53","func_code":"def unique(data):\n previous = []\n new = []\n for integer in data:\n if integer not in new and integer not in previous:\n new.append(integer)\n elif integer not in new and integer in previous:\n continue\n elif integer in new and integer not in previous:\n previous.append(integer)\n new.remove(integer)\n return new\n\n\ndef swap_unique_keys_values(d):\n values = [n for n in list(d.values())]\n special = unique(values)\n return {v: k for k, v in list(d.items()) if v in special}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":20490,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-02-24 13:06:53","func_code":"def unique(data):\n previous = []\n new = []\n for integer in data:\n if integer not in new and integer not in previous:\n new.append(integer)\n elif integer not in new and integer in previous:\n continue\n elif integer in new and integer not in previous:\n previous.append(integer)\n new.remove(integer)\n return new\n\n\ndef swap_unique_keys_values(d):\n values = [n for n in list(d.values())]\n special = unique(values)\n return {v: k for k, v in list(d.items()) if v in special}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":474,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-02-24 13:06:53","func_code":"def unique(data):\n previous = []\n new = []\n for integer in data:\n if integer not in new and integer not in previous:\n new.append(integer)\n elif integer not in new and integer in previous:\n continue\n elif integer in new and integer not in previous:\n previous.append(integer)\n new.remove(integer)\n return new\n\n\ndef swap_unique_keys_values(d):\n values = [n for n in list(d.values())]\n special = unique(values)\n return {v: k for k, v in list(d.items()) if v in special}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":20124,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2017-02-24 13:15:38","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k, v in list(d.items()):\n if not v in new_d:\n new_d[v] = k\n else:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":28476,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2017-02-24 13:15:38","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k, v in list(d.items()):\n if not v in new_d:\n new_d[v] = k\n else:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":29278,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2017-02-24 13:15:38","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k, v in list(d.items()):\n if not v in new_d:\n new_d[v] = k\n else:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":19895,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-24 13:17:56","func_code":"def swap_keys_values(k, v):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":15048,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-24 13:18:28","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":31202,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-24 13:18:28","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":16835,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-24 13:18:28","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":39523,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-02-24 13:19:17","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":10249,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-02-24 13:19:17","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":100,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-02-24 13:19:17","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":17815,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-02-24 13:24:40","func_code":"def swap_keys_values(d):\n my_dict = d\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":8364,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-02-24 13:24:40","func_code":"def swap_keys_values(d):\n my_dict = d\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":16122,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-02-24 13:24:40","func_code":"def swap_keys_values(d):\n my_dict = d\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":27368,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:09:09","func_code":"def swap_keys_values(dict):\n return {v: k for k, v in list(dict.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":8400,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:09:09","func_code":"def swap_keys_values(dict):\n return {v: k for k, v in list(dict.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":20137,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:09:40","func_code":"def swap_unique_keys_values(dict):\n return {v: k for k, v in list(dict.items()) if dict.values.count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37778,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:09:56","func_code":"def swap_unique_keys_values(dict):\n return {v: k for k, v in list(dict.items()) if list(dict.values()).\n count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":17057,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:10:11","func_code":"def swap_unique_keys_values(dict):\n return {v: k for k, v in list(dict.items()) if list(dict.values()).\n count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":31718,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:10:11","func_code":"def swap_unique_keys_values(dict):\n return {v: k for k, v in list(dict.items()) if list(dict.values()).\n count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":18378,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:10:11","func_code":"def swap_unique_keys_values(dict):\n return {v: k for k, v in list(dict.items()) if list(dict.values()).\n count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":16008,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-02-24 14:34:43","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":41753,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-02-24 14:34:43","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":36856,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-02-24 14:34:43","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":26833,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:32:25","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n values = list(d.values())\n for k, v in list(d.items()):\n if values.count(v) == 1:\n d2[v] = k\n print(d2)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":7978,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:38:41","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n values = list(d.values())\n d2 = [(v, k) for k, v in list(d.items()) if values.count(v) == 1]\n print(d2)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":29182,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:39:16","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n values = list(d.values())\n d2 = [(v, k) for k, v in sorted(d.items()) if values.count(v) == 1]\n print(d2)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":30386,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:39:50","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n values = list(d.values())\n d2 = [(v, k) for k, v in list(sorted(d).items()) if values.count(v) == 1]\n print(d2)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":30006,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:40:45","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n values = list(d.values())\n print(sorted(d.items()))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":21750,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:41:37","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n values = list(d.values())\n sort = sorted(d.items())\n d2 = [(v, k) for k, v in sort if values.count(v) == 1]\n print(d2)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":17074,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:52:31","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n l = [(k, v) for k, v in list(d.items()) if values.count(v) == 1]\n print(sorted(l))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":15103,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:52:56","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n l = [(v, k) for k, v in list(d.items()) if values.count(v) == 1]\n print(sorted(l))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32247,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:53:48","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n l = [(k, v) for k, v in list(d.items()) if values.count(v) == 1]\n print(sorted(l))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":27167,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:02:43","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = list(d.items())\n l = [(v, k) for k, v in items if values.count(v) == 1]\n print(sorted(l))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8905,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:04:05","func_code":"def swap_unique_keys_values(d):\n print(d)\n values = list(d.values())\n items = list(d.items())\n l = [(v, k) for k, v in items if values.count(v) == 1]\n print(sorted(l))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":11006,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:04:26","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = list(d.items())\n l = [(v, k) for k, v in items if values.count(v) == 1]\n print(sorted(l))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8384,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:04:44","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = list(d.items())\n l = [(v, k) for k, v in items if values.count(v) == 1]\n return sorted(l)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37086,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:05:33","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = list(d.items())\n l = {v: k for k, v in items if values.count(v) == 1}\n return sorted(l)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":41827,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:06:54","func_code":"def swap_unique_keys_values(d):\n print(d)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":38319,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:07:36","func_code":"def swap_unique_keys_values(d):\n print(d)\n print(list(d.values()))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":17325,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:08:15","func_code":"def swap_unique_keys_values(d):\n print(d)\n values = list(d.values())\n print(sorted(d.items()))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":20370,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:08:33","func_code":"def swap_unique_keys_values(d):\n print(d)\n values = list(d.values())\n print(list(d.items()))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":17425,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:18:08","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for k, v in sorted(items)}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":35355,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:18:23","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {k: v for k, v in sorted(items)}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":42168,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:19:05","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":40603,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:19:05","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":28331,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:19:05","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":3986,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:08:19","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":18597,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:08:19","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":22806,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:26:33","func_code":"def swap_unique_keys_values(d):\n for w in list(d.keys()):\n if list(d.keys()).count(w) > 1:\n d.popitem(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":22648,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:27:48","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":19112,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:30:05","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n m = w\n d.popitem(d[w])\n d.popitem(d[m])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":22906,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:32:55","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n m = w\n d.popitem(d[w])\n d.popitem(d[m])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":21523,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:33:19","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n m = ''\n if list(d.items()).count(w) > 1:\n m = w\n d.popitem(d[w])\n d.popitem(d[m])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":623,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:34:39","func_code":"def swap_unique_keys_values(d):\n print(lies(list(d.items())))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":34793,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:34:54","func_code":"def swap_unique_keys_values(d):\n print(list(d.items()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":31535,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:36:01","func_code":"def swap_unique_keys_values(d):\n print(list(d.keys()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":39450,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:36:30","func_code":"def swap_unique_keys_values(d):\n print(list(d.keys()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":5699,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:36:54","func_code":"def swap_unique_keys_values(d):\n print(list(d.items()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":31813,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:37:23","func_code":"def swap_unique_keys_values(d):\n print(list(d.items()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":14534,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:40:03","func_code":"def swap_unique_keys_values(d):\n print(list(d.items()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n for s in list(d.items()):\n if d[s] == d[w]:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8752,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:40:26","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n for s in list(d.items()):\n if d[s] == d[w]:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":7688,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:41:06","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n for s in list(d.items()):\n if d[s] == d[w]:\n d.popitem(d[s])\n d.popitem(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":13758,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:48:21","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n for s in list(d.items()):\n if d[s] == w:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37771,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:49:56","func_code":"def swap_unique_keys_values(d):\n print(list(d.items()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n for s in list(d.items()):\n if d[s] == w:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":11677,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:57:39","func_code":"def swap_unique_keys_values(d):\n items = list(d.items())\n for w in items:\n if items.count(w) > 1:\n d.popitem(d[w])\n for s in items:\n if d[s] == w:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":4580,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 18:02:38","func_code":"def swap_unique_keys_values(d):\n items = list(d.items())\n for w in items:\n if items.count(w) > 1:\n d.popitem(d[w])\n for s in items:\n if s == w:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":38344,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 18:02:38","func_code":"def swap_unique_keys_values(d):\n items = list(d.items())\n for w in items:\n if items.count(w) > 1:\n d.popitem(d[w])\n for s in items:\n if s == w:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":6017,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 18:02:38","func_code":"def swap_unique_keys_values(d):\n items = list(d.items())\n for w in items:\n if items.count(w) > 1:\n d.popitem(d[w])\n for s in items:\n if s == w:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":18656,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:01:38","func_code":"def swap_keys_values(dict):\n new_dict = {v: k for k, v in list(dict.items())}\n print(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":28762,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:02:14","func_code":"def swap_keys_values(dict):\n new_dict = {v: k for k, v in list(dict.items())}\n print(list(new_dict.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":13309,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:05:17","func_code":"def swap_keys_values(dict):\n new_dict = {v: k for k, v in list(dict.items())}\n print([new_dict])","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":2754,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:13:41","func_code":"def swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n print([new_dict])\n for k in new_dict:\n l.append('({} : {})'.format(k, new_dict[k]))\n print(l)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":1002,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:21:05","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({} : {})'.format(k, new_dict[k]))\n print(sorted(l, key=my_function))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":13654,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:24:43","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({} : {})'.format(k, new_dict[k]))\n print('[' + ', '.join(sorted(l, key=my_function)) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":10524,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:29:51","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({} : {})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')\n print(type(l[1]))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":8418,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:30:08","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({} : {})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":41094,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:30:25","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({}, : {})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":40713,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:30:41","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({}, {})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":34949,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:30:54","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({}, {})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":18971,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:31:24","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({}, {:2s})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":9675,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:31:40","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({}, {:>2s})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":32640,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:32:01","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({}, {:>2s})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":5011,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:32:41","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append(\"({}, '{:>2s}')\".format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":28278,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:32:56","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append(\"({}, '{}')\".format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":1339,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:33:10","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append(\"({}, '{}')\".format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-3))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":30369,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:34:18","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append(\"({}, '{}')\".format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-3))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":16438,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:47:20","func_code":"def swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n new_dict1 = new_dict.copy()\n for k in new_dict1:\n l.append(\"({}, '{}')\".format(int(k), new_dict1[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-3))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":8377,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 20:44:13","func_code":"def swap_keys_values(a):\n l = []\n new_dict = {v: k for k, v in list(a.items())}\n return sorted(new_dict.items())","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":16994,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:05:49","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n return sorted(new_dict.items())","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":22286,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:10:36","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n pprint(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":14165,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:16:12","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n pprint(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":36616,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:17:23","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n pprint(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":38570,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:17:59","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n print(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":6832,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:19:28","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n print(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":6536,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:20:00","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n return sorted(new_dict.items())\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":5464,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:25:22","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n print(type(sorted(new_dict.items())))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":11981,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:45:22","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n pprint(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":18178,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:45:22","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n pprint(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":19805,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:45:22","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n pprint(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":30482,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 08:57:43","func_code":"def swap_keys_values(d):\n new_d = {}\n for key in d:\n new_d[d[key]] = key\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":18854,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 08:57:43","func_code":"def swap_keys_values(d):\n new_d = {}\n for key in d:\n new_d[d[key]] = key\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":26062,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 09:05:29","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key in d:\n if list(d.values()).count(d[key]) == 1:\n new_d[d[key]] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":5048,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 09:07:44","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = []\n for key in d:\n for value in list(d.values()):\n a.append(value)\n if a.count(d[key]) == 1:\n new_d[d[key]] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":3431,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 09:13:01","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = []\n for value in list(d.values()):\n a.append(value)\n for key in d:\n if a.count(d[key]) == 1:\n new_d[d[key]] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":36126,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 09:13:01","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = []\n for value in list(d.values()):\n a.append(value)\n for key in d:\n if a.count(d[key]) == 1:\n new_d[d[key]] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":42331,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 09:13:01","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = []\n for value in list(d.values()):\n a.append(value)\n for key in d:\n if a.count(d[key]) == 1:\n new_d[d[key]] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":25614,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-02-25 12:15:49","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":23826,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-02-25 12:15:49","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":3387,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-02-25 12:15:49","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":24662,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:07:18","func_code":"def swap_unique_keys_values(d):\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":17554,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:08:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":16089,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:09:26","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.values())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":38461,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:09:45","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":21121,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:10:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if 'a' not in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":40877,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:10:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if 'a' not in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":20489,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:10:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if 'a' not in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":29130,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-02-25 16:25:51","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":9038,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-02-25 16:25:51","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":11283,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-02-25 16:47:35","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.values()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":16760,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-02-25 16:47:56","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.values()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":10543,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-02-25 16:47:56","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.values()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":31716,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-02-25 16:47:56","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.values()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":18312,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-25 20:09:32","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d\n if __name__ == '__main__':\n main()","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":32715,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-25 20:09:32","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d\n if __name__ == '__main__':\n main()","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":23531,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-25 20:09:32","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d\n if __name__ == '__main__':\n main()","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":14972,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-02-25 21:13:18","func_code":"def swap_keys_values(s):\n for k, v in list(my_dict.items()):\n del my_dict[k]\n my_dict[v] = k\n print(my_dict)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":27255,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-02-26 10:47:09","func_code":"def swap_keys_values(d):\n {v: k for k, v in d.items}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":14682,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:48:32","func_code":"def swap_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":39024,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:48:48","func_code":"def swap_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":28814,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:48:48","func_code":"def swap_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":30056,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:55:20","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n if pair[1] not in new_dict:\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":19804,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:56:51","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n if pair[1] not in new_dict:\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":4239,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:58:18","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n if pair[1] not in new_dict:\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":17591,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:58:18","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n if pair[1] not in new_dict:\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":25983,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:58:18","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n if pair[1] not in new_dict:\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":1642,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:04:51","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(new_d.values()):\n new_d[key] = value\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":5226,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:05:30","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(new_d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":10623,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:08:18","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n keys = list(set(d.keys()))\n values = list(set(d.values()))\n i = 0\n while i < len(keys):\n new_d[values[i]] = keys[i]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":27773,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:08:34","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n keys = list(set(d.keys()))\n values = list(set(d.values()))\n i = 0\n while i < len(keys):\n new_d[values[i]] = keys[i]\n i = i + 1\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":5191,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:09:06","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n keys = list(set(d.keys()))\n values = list(set(d.values()))\n print((keys, values))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":20446,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:15:53","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = list(set(d.values()) & set(d.values()))\n for k, v in list(d.items()):\n if v not in a:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":25599,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:16:16","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = list(set(d.values()) & set(d.values()))\n print(a)\n for k, v in list(d.items()):\n if v not in a:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":19093,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:18:05","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = list(d.values()) - list(set(d.values))\n print(a)\n for k, v in list(d.items()):\n if v not in a:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":13118,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:19:09","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = list(d.values()) - (list(set(d.values())) - list(d.values()))\n print(a)\n for k, v in list(d.items()):\n if v not in a:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":39564,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:25:46","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = set(d.values()) | set(d.values())\n print(a)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":7509,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:26:23","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = set(d.values()) & set(d.values())\n print(a)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":16406,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:26:58","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = list(d.values()) - list(set(d.values()))\n print(a)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":16169,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:28:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = list(d.values()) - set(d.values())\n print(a)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":5128,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:58:37","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":19401,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:59:21","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if [v for v in list(d.values()\n )].count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":1814,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:59:21","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if [v for v in list(d.values()\n )].count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":41191,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:59:21","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if [v for v in list(d.values()\n )].count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":35871,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-02-26 19:11:09","func_code":"def swap_keys_values(d_0):\n d = {}\n for key in d_0:\n d[d_0[key]] = key\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":18847,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-02-26 19:11:09","func_code":"def swap_keys_values(d_0):\n d = {}\n for key in d_0:\n d[d_0[key]] = key\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":26690,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-02-26 19:15:17","func_code":"def swap_unique_keys_values(d_0):\n d = {}\n for key in d_0:\n d[d_0[key]] = key\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":40338,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-02-26 19:18:50","func_code":"def swap_unique_keys_values(d_0):\n d = {}\n for key in d_0:\n if d_0[key] not in d:\n d[d_0[key]] = key\n else:\n del d[d_0[key]]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":12819,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-02-26 19:18:50","func_code":"def swap_unique_keys_values(d_0):\n d = {}\n for key in d_0:\n if d_0[key] not in d:\n d[d_0[key]] = key\n else:\n del d[d_0[key]]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":4287,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-02-26 19:18:50","func_code":"def swap_unique_keys_values(d_0):\n d = {}\n for key in d_0:\n if d_0[key] not in d:\n d[d_0[key]] = key\n else:\n del d[d_0[key]]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":34754,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-02-26 19:23:09","func_code":"def swap_keys_values(d):\n {v: k for k, v in d.items}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":15653,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-02-26 19:23:09","func_code":"def swap_keys_values(d):\n {v: k for k, v in d.items}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":13026,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-02-26 19:23:09","func_code":"def swap_keys_values(d):\n {v: k for k, v in d.items}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":3459,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-26 21:53:33","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":20649,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-26 21:53:33","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":38273,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-26 21:53:33","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":32937,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:21:07","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n print(dict_keys)\n print(dict_values)\n d = {}\n i = 0\n while i < len(dict_keys):\n d[dict_keys[i]] = dict_values[i]\n i = i + 1\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":41774,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:21:31","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n i = 0\n while i < len(dict_keys):\n d[dict_keys[i]] = dict_values[i]\n i = i + 1\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":15330,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:25:07","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n i = 0\n while i < len(dict_keys):\n d[dict_keys[i]] = dict_values[i]\n i = i + 1\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32523,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:25:31","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n i = 0\n while i < len(dict_keys):\n d[dict_keys[i]] = dict_values[i]\n i = i + 1\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":2254,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:26:37","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n for i in range(0, len(dict_keys)):\n d[dict_keys[i]] = dict_values[i]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":1748,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:26:37","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n for i in range(0, len(dict_keys)):\n d[dict_keys[i]] = dict_values[i]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":20250,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:26:37","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n for i in range(0, len(dict_keys)):\n d[dict_keys[i]] = dict_values[i]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":3504,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-26 22:31:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n t = []\n for k, v in list(d.items()):\n if v not in new_d:\n new_d[v] = k\n else:\n t.append(v)\n for v in t:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":11552,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-26 22:31:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n t = []\n for k, v in list(d.items()):\n if v not in new_d:\n new_d[v] = k\n else:\n t.append(v)\n for v in t:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":23690,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-26 22:31:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n t = []\n for k, v in list(d.items()):\n if v not in new_d:\n new_d[v] = k\n else:\n t.append(v)\n for v in t:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":21086,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-26 23:02:47","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":42371,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-26 23:38:11","func_code":"def swap_unique_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items()) if list(d.values())\n .count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":9094,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-26 23:39:20","func_code":"def swap_unique_keys_values(d):\n new_dict = print(sorted(dict([(v, k) for k, v in d.items() if list(d.\n values()).count(v) == 1])))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":28249,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-26 23:39:20","func_code":"def swap_unique_keys_values(d):\n new_dict = print(sorted(dict([(v, k) for k, v in d.items() if list(d.\n values()).count(v) == 1])))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8654,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-26 23:39:20","func_code":"def swap_unique_keys_values(d):\n new_dict = print(sorted(dict([(v, k) for k, v in d.items() if list(d.\n values()).count(v) == 1])))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":15836,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-27 09:27:10","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":41724,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:27:37","func_code":"def swap_keys_values(d):\n return {value: key for key, value in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":36795,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:27:37","func_code":"def swap_keys_values(d):\n return {value: key for key, value in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":29475,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:29:33","func_code":"def swap_unique_keys_values(d):\n new_dict = {value: key for key, value in list(d.items()) if value not in\n new_dict}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":31856,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:29:46","func_code":"def swap_unique_keys_values(d):\n new_dict = {value: key for key, value in list(d.items()) if value not in\n new_dict}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":35658,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:30:52","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for key, value in list(d.items()):\n if value not in new_dict:\n new_dict[value] = key\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":18497,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:31:45","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for key, value in list(d.items()):\n if value not in new_dict:\n new_dict[value] = key\n else:\n del new_dict[value]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":29755,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:31:45","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for key, value in list(d.items()):\n if value not in new_dict:\n new_dict[value] = key\n else:\n del new_dict[value]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":7618,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-27 09:38:46","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":14398,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-27 09:38:46","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":24699,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-27 09:38:46","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":31352,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-27 12:42:12","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":3984,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-27 12:43:11","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":35917,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-27 12:44:03","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":5657,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:23:28","func_code":"def swap_unique_keys_values(d):\n items = set(d.itmes())\n for w in items:\n if items.count(w) > 1:\n d.pop(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":21397,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:24:06","func_code":"def swap_unique_keys_values(d):\n items = set(d.items())\n for w in items:\n if items.count(w) > 1:\n d.pop(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":10709,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-02-27 13:30:07","func_code":"def swap_keys_values(d):\n new_d = dict(list(zip(list(d.values()), list(d.keys()))))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":14484,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-02-27 13:30:07","func_code":"def swap_keys_values(d):\n new_d = dict(list(zip(list(d.values()), list(d.keys()))))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":2177,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-02-27 13:30:07","func_code":"def swap_keys_values(d):\n new_d = dict(list(zip(list(d.values()), list(d.keys()))))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":17439,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:31:19","func_code":"def swap_unique_keys_values(d):\n items = set(d.items())\n for w in items:\n if items.count(w) > 1:\n d.pop(d[w])\n print(items)\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":34423,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:31:40","func_code":"def swap_unique_keys_values(d):\n items = set(d.items())\n print(items)\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":30555,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:31:55","func_code":"def swap_unique_keys_values(d):\n items = set(d.items())\n print(items)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":19349,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:31:55","func_code":"def swap_unique_keys_values(d):\n items = set(d.items())\n print(items)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":33173,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:31:55","func_code":"def swap_unique_keys_values(d):\n items = set(d.items())\n print(items)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":18156,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-27 13:47:00","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":6112,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-27 13:47:00","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":6344,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-27 13:47:00","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":30148,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-27 14:03:24","func_code":"def swap_unique_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n l = []\n for i in a:\n l.append(a[i])\n for i in l:\n if l.count(i) > 1:\n del new_dict[i]\n break\n return new_dict\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":22561,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-27 14:03:51","func_code":"def swap_unique_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n l = []\n for i in a:\n l.append(a[i])\n for i in l:\n if l.count(i) > 1:\n del new_dict[i]\n break\n return new_dict\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":17836,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-27 14:03:51","func_code":"def swap_unique_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n l = []\n for i in a:\n l.append(a[i])\n for i in l:\n if l.count(i) > 1:\n del new_dict[i]\n break\n return new_dict\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":18406,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-27 14:03:51","func_code":"def swap_unique_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n l = []\n for i in a:\n l.append(a[i])\n for i in l:\n if l.count(i) > 1:\n del new_dict[i]\n break\n return new_dict\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":28220,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-02-27 14:20:25","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":10459,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-02-27 14:20:25","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":27267,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-02-27 14:21:16","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":6805,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-02-27 14:21:16","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":16312,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 10:12:47","func_code":"def swap_keys_values(d):\n new_d = {}\n for k in d:\n new_d[d[k]] = k\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":25595,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 10:13:06","func_code":"def swap_keys_values(d):\n new_d = {}\n for k in d:\n new_d[d[k]] = k\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":23987,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 10:13:06","func_code":"def swap_keys_values(d):\n new_d = {}\n for k in d:\n new_d[d[k]] = k\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":10714,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-02-28 10:14:26","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":41649,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-02-28 10:14:26","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":8351,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-02-28 10:16:25","func_code":"def swap_unique_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items()) if list(d.values())\n .count(v) == 1])\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":6985,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-02-28 10:16:25","func_code":"def swap_unique_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items()) if list(d.values())\n .count(v) == 1])\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":4465,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 10:19:33","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k in d:\n if d[k] not in new_d:\n new_d[d[k]] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":36894,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 10:20:05","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k in d:\n if d[k] not in new_d:\n new_d[d[k]] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":27507,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-02-28 10:47:34","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":31754,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-02-28 10:47:34","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":30160,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-02-28 10:47:34","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":16540,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-02-28 11:31:20","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n print(sorted(new_dict.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":38689,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-02-28 11:31:20","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n print(sorted(new_dict.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":29085,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-02-28 13:27:26","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":14734,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-02-28 13:28:02","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":22460,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-02-28 13:53:27","func_code":"def swap_keys_values(d):\n d1 = {}\n for k, v in list(d.items()):\n d1[v] = k\n return d1","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":4822,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-02-28 13:53:27","func_code":"def swap_keys_values(d):\n d1 = {}\n for k, v in list(d.items()):\n d1[v] = k\n return d1","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":26302,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 13:55:53","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n values = list(d.values())\n keys = list(d.keys())\n i = 0\n for i in range(0, len(values)):\n if values.count(values[i]) < 2:\n new_d[values[i]] = keys[i]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":4533,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 13:55:53","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n values = list(d.values())\n keys = list(d.keys())\n i = 0\n for i in range(0, len(values)):\n if values.count(values[i]) < 2:\n new_d[values[i]] = keys[i]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":8868,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-02-28 14:02:29","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n num = []\n let = []\n for k, v in list(d.items()):\n if v not in num and k not in let:\n d1[v] = k\n num.append(v)\n let.append(k)\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":14202,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-02-28 14:03:16","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n num = []\n let = []\n print(d)\n for k, v in list(d.items()):\n if v not in num and k not in let:\n d1[v] = k\n num.append(v)\n let.append(k)\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":2662,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-02-28 14:03:16","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n num = []\n let = []\n print(d)\n for k, v in list(d.items()):\n if v not in num and k not in let:\n d1[v] = k\n num.append(v)\n let.append(k)\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":21567,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-02-28 14:51:38","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if key == k:\n break\n if di[k] == d[key]:\n continue\n else:\n store[key] = d[k]\n return {v: k for v, k in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":36756,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-02-28 14:51:38","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if key == k:\n break\n if di[k] == d[key]:\n continue\n else:\n store[key] = d[k]\n return {v: k for v, k in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32311,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-02-28 14:51:38","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if key == k:\n break\n if di[k] == d[key]:\n continue\n else:\n store[key] = d[k]\n return {v: k for v, k in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":39154,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-02-28 15:48:58","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":12496,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-02-28 15:48:58","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":2820,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:04:21","func_code":"def swap_keys_values():\n return {v: k for k, v in d.items}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":15801,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:05:01","func_code":"def swap_keys_values():\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":14686,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:07:36","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":7225,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:07:36","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":6665,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:08:31","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.items()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":36881,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:09:05","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.values()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":37885,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:09:05","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.values()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":20534,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-28 16:50:03","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":14551,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-28 16:51:10","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":9277,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-28 16:51:33","func_code":"def swap_keys_values(my_dict):\n my_dict = {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":34017,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-28 16:51:50","func_code":"def swap_keys_values(my_dict):\n my_dict = {v: k for k, v in list(my_dict.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":25600,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-28 16:51:50","func_code":"def swap_keys_values(my_dict):\n my_dict = {v: k for k, v in list(my_dict.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":23336,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-28 16:51:50","func_code":"def swap_keys_values(my_dict):\n my_dict = {v: k for k, v in list(my_dict.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":8309,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-28 17:11:05","func_code":"def swap_unique_keys_values(d):\n new_dict = print(sorted(dict([(v, k) for k, v in d.items() if list(d.\n values()).count(v) == 1])))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":13626,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-28 17:11:05","func_code":"def swap_unique_keys_values(d):\n new_dict = print(sorted(dict([(v, k) for k, v in d.items() if list(d.\n values()).count(v) == 1])))","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":16299,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-02-28 18:46:09","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n print(swapped_d)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":16172,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 21:13:08","func_code":"def swap_keys_values(d):\n m = {}\n for i in list(d.items()):\n m[i[1]] = i[0]\n return m","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":22154,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 21:13:08","func_code":"def swap_keys_values(d):\n m = {}\n for i in list(d.items()):\n m[i[1]] = i[0]\n return m","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":13577,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 21:24:52","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if i[1] not in m:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":38305,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-02-28 21:33:14","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":20085,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-02-28 21:33:14","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":15562,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 21:49:37","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if i[1].count(d) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":28543,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 21:57:26","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if list(d.values()).count(i[1]) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":32001,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 22:00:41","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if d.count(i[1]) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":24820,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 22:00:41","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if d.count(i[1]) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32226,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 22:00:41","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if d.count(i[1]) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37683,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-02-28 23:17:58","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n print(list(swapped_d.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":10150,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-02-28 23:20:07","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n return swapped_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":11409,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-02-28 23:20:07","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n return swapped_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":5790,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-02-28 23:20:07","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n return swapped_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":6414,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2017-03-01 01:03:11","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":14315,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2017-03-01 01:03:59","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":23765,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2017-03-01 01:03:59","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":4188,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2017-03-01 01:03:59","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":5024,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-01 11:48:58","func_code":"def swap_keys_values(x):\n for a in d:\n e[d[value]] = e[d[key]]","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":29111,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-01 12:27:00","func_code":"def swap_keys_values(x):\n for a in d:\n e[d[value]] = e[d[key]]\n return e","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":6053,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 12:32:09","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":21464,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 12:38:59","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":40463,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 12:40:41","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":16815,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 12:41:22","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":5056,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 12:41:22","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":29807,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-01 12:42:51","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.avlues()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":24276,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-01 12:43:08","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":20139,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-01 12:43:08","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":10584,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-01 12:43:08","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":18286,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:50:37","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([v])\n del out_dict[v]\n elif v not in blacklist:\n out_dict[v] = k","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":3997,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:51:26","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([v])\n del out_dict[v]\n elif v not in blacklist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":42182,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:51:53","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([v])\n del out_dict[v]\n elif t not in blacklist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":30467,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:52:21","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([v])\n del out_dict[v]\n elif t not in blist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":21192,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:52:36","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([t])\n del out_dict[t]\n elif t not in blist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":7627,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:52:53","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([t])\n del out_dict[t]\n elif t not in blist:\n out_dict[t] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":41252,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:52:53","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([t])\n del out_dict[t]\n elif t not in blist:\n out_dict[t] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":13012,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:52:53","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([t])\n del out_dict[t]\n elif t not in blist:\n out_dict[t] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":41173,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:10:59","func_code":"def swap_unique_keys_values(dick):\n newdick = {}\n for k, v in list(dick.items()):\n if v not in newdick:\n newdick[v] = k\n return newdick","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":7230,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:13:18","func_code":"def swap_unique_keys_values(dick):\n newdick = {}\n for k, v in list(dick.items()):\n if v not in newdick:\n newdick[v] = k\n return newdick","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":15494,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:16:07","func_code":"def swap_unique_keys_values(dick):\n newdick = {}\n for k, v in list(dick.items()):\n if list(dick.values()).count(v) == 1:\n newdick[v] = k\n return newdick","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":26643,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:17:58","func_code":"def swap_unique_keys_values(dick):\n newdick = {}\n for k, v in list(dick.items()):\n if [v for v in list(dick.values())].count(v) == 1:\n newdick[v] = k\n return newdick","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":37376,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:17:58","func_code":"def swap_unique_keys_values(dick):\n newdick = {}\n for k, v in list(dick.items()):\n if [v for v in list(dick.values())].count(v) == 1:\n newdick[v] = k\n return newdick","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":23328,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:23:33","func_code":"def swap_keys_values():\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":21265,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:23:55","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":14681,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:23:55","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":37877,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:23:55","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":8835,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-01 13:56:11","func_code":"def swap_keys_values(d):\n d = {'cat': 2, 'dog': 7, 'horse': 9, 'whale': 14}\n for key, value in d:\n {value: key for key, value in list(d.items())}\n print(swap_keys_values(d))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":25978,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-01 13:56:11","func_code":"def swap_keys_values(d):\n d = {'cat': 2, 'dog': 7, 'horse': 9, 'whale': 14}\n for key, value in d:\n {value: key for key, value in list(d.items())}\n print(swap_keys_values(d))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":39382,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-01 13:56:11","func_code":"def swap_keys_values(d):\n d = {'cat': 2, 'dog': 7, 'horse': 9, 'whale': 14}\n for key, value in d:\n {value: key for key, value in list(d.items())}\n print(swap_keys_values(d))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":11085,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-01 14:38:57","func_code":"def swap_keys_values(d):\n reverse = {}\n for k, v in list(d.items()):\n reverse[v] = k\n return reverse","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":34742,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-01 14:38:57","func_code":"def swap_keys_values(d):\n reverse = {}\n for k, v in list(d.items()):\n reverse[v] = k\n return reverse","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":29373,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-01 14:38:57","func_code":"def swap_keys_values(d):\n reverse = {}\n for k, v in list(d.items()):\n reverse[v] = k\n return reverse","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":8580,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 14:47:47","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":11392,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 14:48:56","func_code":"def swap_unique_keys_values(d):\n a, b = [v for k, v in list(d.items())], [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":4402,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 14:49:51","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":6637,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 14:49:51","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":32812,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-01 15:05:32","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if list(d.values()).count(i[1]) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":41014,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-01 15:05:32","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if list(d.values()).count(i[1]) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":22779,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 16:17:01","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for k, v in list(in_dict.items()):\n out_dict[v] = k\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":39415,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:05:14","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n list = set()\n for k, v in in_dict.items:\n if v in out_dict():\n list.append([v])\n del out_dict[v]\n elif v not in list:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":11746,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:05:50","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n list = set()\n for k, v in in_dict.items:\n if v in out_dict():\n list.update([v])\n del out_dict[v]\n elif v not in list:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":18413,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:08:59","func_code":"def swap_unique_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items()) if list(d.values())\n .count(v) == 1])\n print(new_dict)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":16282,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:34:29","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":32420,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:34:29","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":8900,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 17:45:59","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":2624,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 17:46:42","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":19894,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 17:46:42","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":14989,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:47:04","func_code":"def swap_keys_values(d):\n return dict([(v, k) for k, v in list(d.items())])","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":1042,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:47:55","func_code":"def swap_keys_values(d):\n return dict([(v, k) for k, v in list(d.items())])","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":27506,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:47:55","func_code":"def swap_keys_values(d):\n return dict([(v, k) for k, v in list(d.items())])","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":28611,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:36:46","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n for k, v in list(d.items()):\n if d.count(v) < 2:\n tempd = {k: v}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":28715,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:46:25","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n for k, v in list(d.items()):\n if v.count(v) < 2:\n tempd = {k: v}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":24892,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:48:04","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n for k, v in list(d.items()):\n if v.count(str(v)) < 2:\n tempd = {k: v}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":11468,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:51:53","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n tempd = {k: v for k, v in list(d.items()) if v.count(v) < 2}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":3915,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:52:40","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n tempd = {k: v for k, v in list(d.items()) if str(v).count(v) < 2}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":31653,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:53:02","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n tempd = {k: v for k, v in list(d.items()) if list(v).count(v) < 2}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":31179,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:53:02","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n tempd = {k: v for k, v in list(d.items()) if list(v).count(v) < 2}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37954,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:53:02","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n tempd = {k: v for k, v in list(d.items()) if list(v).count(v) < 2}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32713,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-02 09:26:30","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":28560,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-02 09:26:30","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":27842,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-02 09:29:13","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":42029,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-02 09:29:13","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":24847,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-02 09:32:09","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n for i in range(0, len(dict_keys)):\n d[dict_keys[i]] = dict_values[i]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":19522,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-02 09:32:09","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n for i in range(0, len(dict_keys)):\n d[dict_keys[i]] = dict_values[i]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":10763,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-02 10:31:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":18732,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-02 10:31:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":2113,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-02 10:31:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":2137,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-02 11:54:54","func_code":"def swap_keys_values(d):\n n_d = {}\n for k in d:\n n_d[d[k]] = k\n return n_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":41629,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-02 11:54:54","func_code":"def swap_keys_values(d):\n n_d = {}\n for k in d:\n n_d[d[k]] = k\n return n_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":5820,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-02 11:54:54","func_code":"def swap_keys_values(d):\n n_d = {}\n for k in d:\n n_d[d[k]] = k\n return n_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":24775,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 13:23:47","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":41990,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 13:23:47","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":9836,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:24:14","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":30491,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:24:14","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":1524,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-02 13:36:34","func_code":"def swap_keys_values(my_dict):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":19309,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-02 13:37:03","func_code":"def swap_keys_values(my_dict):\n new_dict = dict((v, k) for k, v in list(my_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":38182,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-02 13:37:03","func_code":"def swap_keys_values(my_dict):\n new_dict = dict((v, k) for k, v in list(my_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":32876,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-02 13:42:14","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":4711,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-02 13:42:14","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":11307,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-02 13:42:14","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":5721,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:46:07","func_code":"def swap_keys_values(d):\n new = {}\n for z, q in list(d.items()):\n new[q] = z\n return list(new.items())","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":2419,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-02 13:46:39","func_code":"def swap_unique_keys_values(my_dict):\n d = {}\n for key in my_dict:\n value = my_dict.get(k)\n if value in d:\n del d[v]\n else:\n d[v] = k\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32161,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:46:44","func_code":"def swap_unique_keys_values(d):\n return set({v: k for k, v in list(d.items())})","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":13268,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:47:22","func_code":"def swap_keys_values(d):\n new = {}\n for z, q in list(d.items()):\n new[q] = z\n return list(new.items())","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":21209,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-02 13:47:24","func_code":"def swap_unique_keys_values(my_dict):\n d = {}\n for key in my_dict:\n value = my_dict.get(key)\n if value in d:\n del d[value]\n else:\n d[value] = key\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":6835,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-02 13:47:24","func_code":"def swap_unique_keys_values(my_dict):\n d = {}\n for key in my_dict:\n value = my_dict.get(key)\n if value in d:\n del d[value]\n else:\n d[value] = key\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":14170,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:48:31","func_code":"def swap_keys_values(d):\n new = {}\n for z, q in list(d.items()):\n new[q] = z\n return list(new.items())","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":10792,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:49:03","func_code":"def swap_keys_values(d):\n new = {}\n for z, q in list(d.items()):\n new[q] = z\n return list(new.items())","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":14187,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:49:47","func_code":"def swap_keys_values(d):\n new_dict = {}\n for z, q in list(d.items()):\n new[q] = z\n return list(new_dict.items())","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":31362,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:50:14","func_code":"def swap_keys_values(d):\n new_dict = {}\n for z, q in list(d.items()):\n new_dict[q] = z\n return list(new_dict.items())","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":7506,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:50:49","func_code":"def swap_keys_values(d):\n new_dict = {}\n for z, q in list(d.items()):\n new_dict[q] = z\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":26895,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:50:49","func_code":"def swap_keys_values(d):\n new_dict = {}\n for z, q in list(d.items()):\n new_dict[q] = z\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":38907,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:52:06","func_code":"def swap_unique_keys_values(d):\n return set({v: k for k, v in d})","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":3165,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:53:27","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in set(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":40758,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:56:15","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in set(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":40763,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 13:56:16","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":20894,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-02 13:56:55","func_code":"def swap_keys_values(d):\n return {v: k for k, in v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":7529,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-02 13:57:42","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":36400,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-02 13:57:42","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":22857,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:58:07","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in set(d.items()) if v not in set.intersection(\n list(d.items()))}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":14632,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 13:58:34","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":4070,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:58:57","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in set.intersection(list(d.items()))}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":13945,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 13:59:24","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":3394,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 14:03:18","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":27934,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 14:03:36","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":4656,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 14:04:23","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":26942,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 14:04:43","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if (k, v) not in set.\n intersection(list(d.items()))}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":989,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 14:07:05","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":2138,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 14:07:05","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":14691,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 14:07:05","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":21943,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 14:07:41","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(list(d.values()).count\n (v) == 1)}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37412,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 14:08:27","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":12380,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 14:08:27","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":27662,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-03-02 14:18:24","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":30906,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-03-02 14:18:24","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":33289,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-03-02 14:18:38","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":38605,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-03-02 14:18:38","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":11776,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-03-02 14:19:33","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":157,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-03-02 14:19:33","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":4459,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 14:21:17","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n seen = []\n for z, q in list(d.items()):\n if q not in seen:\n new_dict[q] = z\n seen.append(q)\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":36424,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 14:21:17","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n seen = []\n for z, q in list(d.items()):\n if q not in seen:\n new_dict[q] = z\n seen.append(q)\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":13917,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-03-02 14:21:58","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k, v in list(d.items()):\n if not v in new_d:\n new_d[v] = k\n else:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":16818,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-03-02 14:21:58","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k, v in list(d.items()):\n if not v in new_d:\n new_d[v] = k\n else:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":25362,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-03-02 14:21:58","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k, v in list(d.items()):\n if not v in new_d:\n new_d[v] = k\n else:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":4634,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-02 14:22:10","func_code":"def swap_keys_values(x):\n new = {v: k for k, v in list(x.items())}\n return new","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":20558,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-02 14:22:10","func_code":"def swap_keys_values(x):\n new = {v: k for k, v in list(x.items())}\n return new","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":1563,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-02 14:37:47","func_code":"def swap_unique_keys_values(x):\n new = {}\n for k in x:\n c = x.get(k)\n if c in new:\n del new[v]\n else:\n new[v] = k\n return new","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8657,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-02 14:38:14","func_code":"def swap_unique_keys_values(x):\n new = {}\n for k in x:\n c = x.get(k)\n if c in new:\n del new[c]\n else:\n new[c] = k\n return new","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":1755,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-02 14:38:14","func_code":"def swap_unique_keys_values(x):\n new = {}\n for k in x:\n c = x.get(k)\n if c in new:\n del new[c]\n else:\n new[c] = k\n return new","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":6314,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-02 15:48:10","func_code":"def swap_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":33733,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-02 15:48:10","func_code":"def swap_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":27202,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-02 16:00:39","func_code":"def swap_unique_keys_values(d):\n seen = {}\n result = {}\n for k, v in d.items():\n if v in seen:\n del seen[v]\n else:\n seen[v] = k\n result[v] = k\n return seen","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":11277,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-02 16:01:26","func_code":"def swap_unique_keys_values(d):\n seen = {}\n result = {}\n for k, v in list(d.items()):\n if v in seen:\n del seen[v]\n else:\n seen[v] = k\n result[v] = k\n return seen","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":19695,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-02 16:01:26","func_code":"def swap_unique_keys_values(d):\n seen = {}\n result = {}\n for k, v in list(d.items()):\n if v in seen:\n del seen[v]\n else:\n seen[v] = k\n result[v] = k\n return seen","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":7022,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-02 16:01:55","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n uniqueness = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n uniqueness.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n uniqueness[i] = A\n uniqueness[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(uniqueness):\n if uniqueness[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":26153,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-02 16:01:55","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n uniqueness = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n uniqueness.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n uniqueness[i] = A\n uniqueness[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(uniqueness):\n if uniqueness[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":7670,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-02 16:40:41","func_code":"def swap_keys_values(d):\n new_dict = {}\n for keys in list(d.keys()):\n temp = d[keys]\n new_dict[temp] = keys\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":2258,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-02 16:40:41","func_code":"def swap_keys_values(d):\n new_dict = {}\n for keys in list(d.keys()):\n temp = d[keys]\n new_dict[temp] = keys\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":14718,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-02 16:53:34","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for keys in list(d.keys()):\n temp = d[keys]\n if temp in new_dict:\n del new_dict[temp]\n else:\n new_dict[temp] = keys\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":41218,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-02 16:53:34","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for keys in list(d.keys()):\n temp = d[keys]\n if temp in new_dict:\n del new_dict[temp]\n else:\n new_dict[temp] = keys\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":11224,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-02 16:53:34","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for keys in list(d.keys()):\n temp = d[keys]\n if temp in new_dict:\n del new_dict[temp]\n else:\n new_dict[temp] = keys\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":23522,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-02 17:02:33","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":25020,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-02 17:02:33","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":14619,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:15:11","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n return swapped_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":24850,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:15:11","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n return swapped_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":5787,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-02 17:25:18","func_code":"def swap_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":37565,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-02 17:25:18","func_code":"def swap_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":33876,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-02 17:31:36","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":34108,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-02 17:31:55","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k in d:\n v = d.get(k)\n if v in new_d:\n del new_d[v]\n else:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":5325,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-02 17:31:55","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k in d:\n v = d.get(k)\n if v in new_d:\n del new_d[v]\n else:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":10585,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-02 17:31:55","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k in d:\n v = d.get(k)\n if v in new_d:\n del new_d[v]\n else:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":11066,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:46:05","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(uniqueness):\n if uniqueness[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":5461,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:46:16","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(uniqueness):\n if uniqueness[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":18677,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:46:39","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(unique):\n if uniqueness[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":34211,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:48:23","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(unique):\n if uniqueness[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":1998,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:48:40","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(unique):\n if unique[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":11118,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:48:40","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(unique):\n if unique[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":24708,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:48:40","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(unique):\n if unique[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":40412,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-02 18:16:13","func_code":"def swap_keys_values(d):\n for i in d:\n j[d[i]] = i\n return j","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":7362,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-02 18:16:40","func_code":"def swap_keys_values(d):\n for i in d:\n j[d[i]] = i\n return j","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":19911,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-02 18:16:40","func_code":"def swap_keys_values(d):\n for i in d:\n j[d[i]] = i\n return j","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":37624,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-03-02 18:18:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n doubles = set()\n for k, v in list(d.items()):\n if v in new_d:\n doubles.add(v)\n new_d[v] = k\n for k in doubles:\n del new_d[k]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":39019,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-03-02 18:18:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n doubles = set()\n for k, v in list(d.items()):\n if v in new_d:\n doubles.add(v)\n new_d[v] = k\n for k in doubles:\n del new_d[k]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":2668,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-03-02 18:18:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n doubles = set()\n for k, v in list(d.items()):\n if v in new_d:\n doubles.add(v)\n new_d[v] = k\n for k in doubles:\n del new_d[k]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":41286,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-02 18:21:54","func_code":"def swap_keys_values():\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":34633,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-02 18:22:24","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":35033,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-02 18:22:59","func_code":"def swap_keys_values(d):\n {v: k for k, v in d}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":27166,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-02 18:23:49","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":16270,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-02 18:23:49","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":3233,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-02 18:29:36","func_code":"def swap_unique_keys_values(d):\n for i in d:\n if d[i] in j:\n del j[d[i]]\n else:\n j[d[i]] = i\n return j","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":9694,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-02 18:29:36","func_code":"def swap_unique_keys_values(d):\n for i in d:\n if d[i] in j:\n del j[d[i]]\n else:\n j[d[i]] = i\n return j","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":12663,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-02 18:29:36","func_code":"def swap_unique_keys_values(d):\n for i in d:\n if d[i] in j:\n del j[d[i]]\n else:\n j[d[i]] = i\n return j","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":39818,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-02 18:33:40","func_code":"def swap_unique_keys_values(d):\n n_dict = {}\n double = set()\n for k, v in list(d.items()):\n if v in n_dict:\n double.add(v)\n n_dict[v] = k\n for k in double:\n del n_dict[k]\n return n_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":18889,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-02 18:33:40","func_code":"def swap_unique_keys_values(d):\n n_dict = {}\n double = set()\n for k, v in list(d.items()):\n if v in n_dict:\n double.add(v)\n n_dict[v] = k\n for k in double:\n del n_dict[k]\n return n_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":9399,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-02 18:33:40","func_code":"def swap_unique_keys_values(d):\n n_dict = {}\n double = set()\n for k, v in list(d.items()):\n if v in n_dict:\n double.add(v)\n n_dict[v] = k\n for k in double:\n del n_dict[k]\n return n_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":8138,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-03-02 19:29:55","func_code":"def swap_keys_values(d):\n new_dictionary = {}\n for x in d:\n key = x\n value = d[x]\n new_dictionary[value] = key\n return new_dictionary","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":22505,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-03-02 19:29:55","func_code":"def swap_keys_values(d):\n new_dictionary = {}\n for x in d:\n key = x\n value = d[x]\n new_dictionary[value] = key\n return new_dictionary","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":24919,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-03-02 19:35:41","func_code":"def swap_unique_keys_values(d):\n new_dictionary = {}\n for x in d:\n key = x\n value = d[x]\n new_dictionary[value] = key\n new_dictionary.pop(7)\n return new_dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":12379,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-03-02 19:35:41","func_code":"def swap_unique_keys_values(d):\n new_dictionary = {}\n for x in d:\n key = x\n value = d[x]\n new_dictionary[value] = key\n new_dictionary.pop(7)\n return new_dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":38828,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-02 19:56:40","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":35931,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-02 19:57:55","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":21319,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-02 19:57:55","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":13041,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-02 20:09:47","func_code":"def swap_unique_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":20060,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-02 20:09:47","func_code":"def swap_unique_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":18626,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-02 20:09:47","func_code":"def swap_unique_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37485,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:30:11","func_code":"def swap_keys_values(d):\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n return swapped_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":39525,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:30:11","func_code":"def swap_keys_values(d):\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n return swapped_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":12169,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:36:31","func_code":"def swap_unique_keys_values(d):\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n return set(swapped_dict)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":29563,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:37:00","func_code":"def swap_unique_keys_values(d):\n swapped_dict = set(dict(list(zip(list(d.values()), list(d.keys())))))\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":25878,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:39:09","func_code":"def swap_unique_keys_values(d):\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n return set(swapped_dict)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":20903,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:40:44","func_code":"def swap_unique_keys_values(d):\n swapped_dict = {v: k for k, v in list(d.items())}\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":35757,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:41:03","func_code":"def swap_unique_keys_values(d):\n swapped_dict = {v: k for k, v in list(d.items())}\n return set(swapped_dict)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":447,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:44:21","func_code":"def swap_keys_values(d):\n reversed_d = {(v, k) for k, v in d.items()}\n return reversed_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":5947,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:46:03","func_code":"def swap_keys_values(d):\n reversed_d = dict((v, k) for k, v in d.items())\n return reversed_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":26413,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:46:31","func_code":"def swap_unique_keys_values(d):\n seen = list(d.keys())\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n for v, k in swapped_dict:\n if k in seen:\n break\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":31724,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:52:03","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":31252,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:52:03","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":37878,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:58:12","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v in list(d.values())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":18577,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:58:12","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v in list(d.values())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":4460,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:58:12","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v in list(d.values())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":31328,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 21:05:10","func_code":"def swap_unique_keys_values(d):\n seen = list(d.keys())\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n print(list(swapped_dict.values()))\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":16992,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 22:04:36","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n unique = [x for x in values if values.count(x) == 1]\n swapped_dict = 0\n if unique in values:\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":31682,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 22:08:05","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n unique = [x for x in values if values.count(x) == 1]\n swapped_dict = 0\n if unique in values:\n swapped_dict = {v: k for k, v in list(d.items())}\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":29552,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 22:08:46","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n unique = [x for x in values if values.count(x) == 1]\n swapped_dict = 0\n if unique == True:\n swapped_dict = {v: k for k, v in list(d.items())}\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":23605,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 22:08:46","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n unique = [x for x in values if values.count(x) == 1]\n swapped_dict = 0\n if unique == True:\n swapped_dict = {v: k for k, v in list(d.items())}\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32913,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 22:08:46","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n unique = [x for x in values if values.count(x) == 1]\n swapped_dict = 0\n if unique == True:\n swapped_dict = {v: k for k, v in list(d.items())}\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":14667,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-03-02 22:48:17","func_code":"def swap_keys_values():\n {v: k for k, v in list(sys.argv[1].items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":37994,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-03-02 22:49:05","func_code":"def swap_keys_values():\n {v: k for k, v in list(sys.argv[0].items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":19620,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-02 22:54:31","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":995,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-02 22:54:31","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":26911,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-02 22:54:31","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":33246,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-03 00:21:11","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = {}\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] += 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":13411,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-03 08:52:27","func_code":"def swap_keys_values(d):\n list(zip(list(d.values()), list(d.keys())))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":10644,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-03 08:54:31","func_code":"def swap_keys_values(d):\n return dict(list(zip(list(d.values()), list(d.keys()))))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":40318,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-03 09:02:29","func_code":"def swap_keys_values(d):\n l = Counter(list(d.values()))\n return {value: key for key, value in list(d.items()) if l[value] == 1}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":3227,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-03 09:02:29","func_code":"def swap_keys_values(d):\n l = Counter(list(d.values()))\n return {value: key for key, value in list(d.items()) if l[value] == 1}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":17341,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-03 09:03:44","func_code":"def swap_unique_keys_values(d):\n l = Counter(list(d.values()))\n return {value: key for key, value in list(d.items()) if l[value] == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":41038,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-03 09:03:44","func_code":"def swap_unique_keys_values(d):\n l = Counter(list(d.values()))\n return {value: key for key, value in list(d.items()) if l[value] == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":9947,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-03 09:11:59","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":5220,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-03 09:11:59","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":3174,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-03 09:20:19","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":1949,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-03 09:20:19","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":16575,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:21:18","func_code":"def swap_keys_values(a):\n for k, v in a.items:\n tmp = k\n k = v\n v = tmp\n return sorted(a)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":11761,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-03 09:21:39","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for t, v in list(in_dict.items()):\n out_dict[v] = t\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":11408,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-03 09:21:39","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for t, v in list(in_dict.items()):\n out_dict[v] = t\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":33796,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:22:10","func_code":"def swap_keys_values(a):\n for k, v in list(a.items()):\n tmp = k\n k = v\n v = tmp\n return sorted(a)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":4498,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:22:58","func_code":"def swap_keys_values(a):\n for k, v in list(a.items()):\n tmp = k\n k = v\n v = tmp\n print(a)\n return sorted(a)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":26976,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-03 09:28:17","func_code":"def swap_unique_keys_values(d):\n new = {}\n for k in d:\n v = d.get(k)\n if v in new:\n del ne[v]\n else:\n new[v] = k\n return new","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":26190,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-03 09:29:05","func_code":"def swap_unique_keys_values(d):\n new = {}\n for k in d:\n v = d.get(k)\n if v in new:\n del new[v]\n else:\n new[v] = k\n return new","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":26082,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-03 09:29:05","func_code":"def swap_unique_keys_values(d):\n new = {}\n for k in d:\n v = d.get(k)\n if v in new:\n del new[v]\n else:\n new[v] = k\n return new","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":8714,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:36:54","func_code":"def swap_keys_values(a):\n for i in a:\n tmp = i\n i = a[i]\n a[i] = tmp\n return sorted(a)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":26041,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:40:45","func_code":"def swap_keys_values(a):\n dir = {}\n for i in a:\n dir[a[i]] = i\n return sorted(dir)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":7841,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:42:23","func_code":"def swap_keys_values(a):\n dir = {}\n for i in a:\n dir[a[i]] = i\n return dir","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":26525,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:42:23","func_code":"def swap_keys_values(a):\n dir = {}\n for i in a:\n dir[a[i]] = i\n return dir","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":30805,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:53:33","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.items()):\n if a.count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if dir[a[i]] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":27754,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:54:13","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.items()):\n if no.count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if dir[a[i]] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":26699,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:55:18","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.items()):\n if no.count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n k = dir[a[i]]\n if k not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":21171,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:56:40","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.items()):\n if no.count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":39350,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:57:19","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.items()):\n if no.count(a) > 1:\n lis.append(no)\n print(lis)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":946,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:58:32","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.items()):\n print(no.count(a))\n if no.count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":12615,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:59:01","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(no.count(a))\n if no.count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":21073,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:59:35","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n if a.count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":12010,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:59:58","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n if int(no).count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8938,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:00:16","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n if str(no).count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":18278,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:01:24","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(str(no).count(a))\n if str(no).count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":13179,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:02:07","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(str(no).count(list(a.values())))\n if str(no).count(list(a.values())) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":17953,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:02:25","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(no.count(list(a.values())))\n if no.count(list(a.values())) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":15240,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:03:07","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n if no.count(list(a.values())) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37032,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:03:52","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n if list(a.values()).count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":9695,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:05:50","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(list(a.values()).count(no))\n if list(a.values()).count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":16858,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:06:15","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(values)\n print(list(a.values()).count(no))\n if list(a.values()).count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":35380,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:06:31","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(a.values)\n if list(a.values()).count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":16215,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:07:46","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n print(d1)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":7472,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:08:33","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(list(a.values()))\n if list(a.values()).count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":9973,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:09:53","func_code":"def swap_unique_keys_values(a):\n lis = []\n val = list(a.values())\n for no in val:\n if val.count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":23736,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:10:14","func_code":"def swap_unique_keys_values(a):\n lis = []\n val = list(a.values())\n for no in val:\n print(val)\n if val.count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":28795,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:10:48","func_code":"def swap_unique_keys_values(a):\n lis = []\n val = list(a.values())\n for no in val:\n print(lis(val))\n if val.count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":10098,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:11:29","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n print(list(d1.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":15029,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-03 10:11:37","func_code":"def swap_keys_values(d):\n new_dict = {}\n for k in d:\n new_dict[d[k]] = k\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":507,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-03 10:11:37","func_code":"def swap_keys_values(d):\n new_dict = {}\n for k in d:\n new_dict[d[k]] = k\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":38789,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:11:42","func_code":"def swap_unique_keys_values(a):\n lis = []\n val = list(a.values())\n for no in val:\n print(val[0])\n if val.count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":35572,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:12:10","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items()).sorted()}\n print(list(d1.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":17211,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:12:38","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.sorted().items())}\n print(list(d1.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":2191,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:14:06","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n print(list(d1.items()).sorted())","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":17713,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:14:55","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n for c in d1:\n print(c)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":26123,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:15:15","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n for c in d1:\n print(c)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":31249,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:18:24","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n print(list(d1.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":27871,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:19:19","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n return d1","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":15088,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:19:19","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n return d1","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":38651,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2017-03-03 10:21:52","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":5555,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2017-03-03 10:21:52","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":25135,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-03 10:23:11","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n a = []\n for v in list(d.values()):\n a.append(v)\n for k in d:\n if a.count(d[k]) == 1:\n new_dict[d[k]] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":22872,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-03 10:23:11","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n a = []\n for v in list(d.values()):\n a.append(v)\n for k in d:\n if a.count(d[k]) == 1:\n new_dict[d[k]] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":1377,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:24:42","func_code":"def swap_unique_keys_values():\n d1 = {v: k for k, v in list(d.items()) if d.count(v) == 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37912,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:27:52","func_code":"def swap_unique_keys_values():\n d1 = {v: k for k, v in list(d.items()) if d.count(d[v]) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":38639,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2017-03-03 10:29:44","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":15929,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2017-03-03 10:29:44","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":5813,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:31:00","func_code":"def swap_unique_keys_values():\n d1 = {v: k for k, v in list(d.items()) if len(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":14872,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:31:35","func_code":"def swap_unique_keys_values():\n d1 = {v: k for k, v in list(d.items()) if len(v) == 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":28302,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:33:38","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items()) if d.count(d[v]) == 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":13376,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:34:55","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items()) if len(v) > 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":29920,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:35:11","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items()) if len(d[v]) > 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":11914,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:36:06","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items()) if list(d.items()).count(v) == 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":19156,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:36:19","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items()) if d.count(v) == 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":25155,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:36:30","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items()) if d.count(d[v]) == 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":23517,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:37:38","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n print(d1)\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":17874,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:40:10","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(no)\n dir = {}\n for i in a:\n if no.count(lis) > 1:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":41929,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:40:34","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(no)\n dir = {}\n for i in a:\n if lis.count(no) > 1:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32772,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:41:05","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(no)\n dir = {}\n for i in a:\n if lis.count(no) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":40074,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:41:46","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(no)\n dir = {}\n print(lis)\n for i in a:\n if lis.count(no) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32134,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:42:08","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(a[no])\n dir = {}\n for i in a:\n if lis.count(no) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":34938,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:42:28","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(a[no])\n dir = {}\n print(lis)\n for i in a:\n if lis.count(no) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":20258,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:42:45","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(a[no])\n dir = {}\n print(lis)\n for i in a:\n if no.count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":39349,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:44:24","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(a[no])\n dir = {}\n for i in a:\n if a[no].count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":16624,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-03 10:44:57","func_code":"def swap_keys_values(d):\n d2 = dict((v, k) for k, v in list(d.items()))\n return d2","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":11240,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-03 10:44:57","func_code":"def swap_keys_values(d):\n d2 = dict((v, k) for k, v in list(d.items()))\n return d2","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":16177,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:45:06","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(str(a[no]))\n dir = {}\n for i in a:\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":17106,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:46:02","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(str(a[no]))\n dir = {}\n for i in a:\n if lis.count(str(a[no])) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8049,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:46:12","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n for c in d1:\n print(c)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":29206,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:46:55","func_code":"def swap_unique_keys_values(d):\n d1 = list(d.items())\n print(d1)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32220,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-03 10:46:59","func_code":"def swap_unique_keys_values(d):\n dict = {}\n for k in d:\n v = d.get(k)\n if v in dict:\n del dict[v]\n else:\n dict[v] = k\n return dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":5783,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-03 10:46:59","func_code":"def swap_unique_keys_values(d):\n dict = {}\n for k in d:\n v = d.get(k)\n if v in dict:\n del dict[v]\n else:\n dict[v] = k\n return dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":25089,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:48:05","func_code":"def swap_unique_keys_values(d):\n d = list(d.items())\n for c in d:\n print(c)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":18511,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:48:23","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += a[no]\n dir = {}\n for i in a:\n if lis.count(str(a[no])) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":31009,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:48:44","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += a[no]\n dir = {}\n for i in a:\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":39221,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:49:08","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += str(a[no])\n dir = {}\n for i in a:\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":2240,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:49:33","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += str(a[no])\n dir = {}\n print(lis)\n for i in a:\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":39268,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:50:10","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += str(a[no])\n dir = {}\n print(lis)\n for i in a:\n print(str(a[no]).count(lis))\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":26592,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:51:20","func_code":"def swap_unique_keys_values(d):\n d = list(d.items())\n l = [(v, k) for k, v in d if d.count(c[1]) == 1]\n print(l)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":42153,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:51:30","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += str(a[no])\n dir = {}\n print(lis)\n for i in a:\n print(lis.count(str(a[no])))\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":5983,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:51:57","func_code":"def swap_unique_keys_values(d):\n d = list(d.items())\n l = [v for k, v in d]\n print(l)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":11323,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:58:25","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += str(a[no])\n dir = {}\n print(lis)\n for i in a:\n print(str(a[no]).count(lis))\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":17509,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-03 11:02:40","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] += 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":34097,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-03 11:03:06","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] += 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":35400,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-03 11:03:06","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] += 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32126,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:08:58","func_code":"def swap_unique_keys_values(d):\n d = list(d.items())\n l = [v for k, v in d]\n z = []\n for c in l:\n if l.count(c) == 1:\n z.append(c)\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":9178,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:09:21","func_code":"def swap_unique_keys_values(d):\n l = [v for k, v in d]\n z = []\n for c in l:\n if l.count(c) == 1:\n z.append(c)\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8895,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:10:47","func_code":"def swap_unique_keys_values(d):\n l = [(k, v) for k, v in d]\n z = []\n for c in l:\n if l.count(c[1]) == 1:\n z.append(c[1])\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":38701,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:12:16","func_code":"def swap_unique_keys_values(d):\n z = []\n for c in list(d.items()):\n if l.count(c[1]) == 1:\n z.append(c[1])\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":4730,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:12:43","func_code":"def swap_unique_keys_values(d):\n z = []\n for c in list(d.items()):\n if list(d.items()).count(c[1]) == 1:\n z.append(c[1])\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":15618,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:13:12","func_code":"def swap_unique_keys_values(d):\n z = []\n for c in list(d.items()):\n print(c)\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":12777,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:13:46","func_code":"def swap_unique_keys_values(d):\n z = []\n for c in list(d.items()):\n print(c[1])\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":41611,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:14:25","func_code":"def swap_unique_keys_values(d):\n z = []\n for c in list(d.items()):\n z.append(c[1])\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":29782,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-03 11:14:48","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n d2 = {}\n unique = []\n for k in list(d.keys()):\n if k in d:\n d1[k] += 1\n else:\n d1[k] = 1\n for k, v in list(d.items()):\n if d1[k] == 1:\n d2[v] = k\n else:\n continue\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":13972,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-03 11:15:38","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n d2 = {}\n unique = []\n for k in list(d.keys()):\n if k in d1:\n d1[k] += 1\n else:\n d1[k] = 1\n for k, v in list(d.items()):\n if d1[k] == 1:\n d2[v] = k\n else:\n continue\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":24511,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:15:46","func_code":"def swap_unique_keys_values(d):\n z = []\n l = []\n for c in list(d.items()):\n l.append(c[1])\n for c in l:\n if l.count(c) == 1:\n z.append(c)\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":27490,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:15:46","func_code":"def swap_unique_keys_values(d):\n z = []\n l = []\n for c in list(d.items()):\n l.append(c[1])\n for c in l:\n if l.count(c) == 1:\n z.append(c)\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":35468,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-03 11:16:03","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":12557,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-03 11:16:03","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":42233,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-03 11:17:08","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n d2 = {}\n unique = []\n for v in list(d.values()):\n if v in d1:\n d1[v] += 1\n else:\n d1[v] = 1\n for k, v in list(d.items()):\n if d1[v] == 1:\n d2[v] = k\n else:\n continue\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":2979,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-03 11:17:08","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n d2 = {}\n unique = []\n for v in list(d.values()):\n if v in d1:\n d1[v] += 1\n else:\n d1[v] = 1\n for k, v in list(d.items()):\n if d1[v] == 1:\n d2[v] = k\n else:\n continue\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":19626,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-03 11:22:02","func_code":"def swap_keys_values(d):\n dic = {}\n for key, value in list(d.items()):\n dic[value] = key\n return dic","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":12744,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-03 11:22:02","func_code":"def swap_keys_values(d):\n dic = {}\n for key, value in list(d.items()):\n dic[value] = key\n return dic","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":34420,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-03 11:27:14","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n alltupps = [(v, k) for k, v in d]\n return alltupps","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37484,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 11:28:21","func_code":"def swap_unique_keys_values(d):\n global skip\n check = []\n for x in list(d.keys()):\n if d[x] not in check:\n check.append(d[x])\n else:\n skip.append(d[x])\n return skip","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":32046,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-03 11:29:28","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n alltupps = [(v, k) for k, v in list(d.items())]\n return alltupps","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":38991,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-03 11:30:01","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blacklist = set()\n for k, v in list(in_dict.items()):\n if v in out_dict:\n blacklist.update([v])\n del out_dict[v]\n elif v not in blacklist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":36906,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-03 11:30:01","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blacklist = set()\n for k, v in list(in_dict.items()):\n if v in out_dict:\n blacklist.update([v])\n del out_dict[v]\n elif v not in blacklist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":6000,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-03 11:30:45","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for k, v in list(in_dict.items()):\n out_dict[v] = k\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":40623,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-03 11:30:45","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for k, v in list(in_dict.items()):\n out_dict[v] = k\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":32055,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-03 11:31:56","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n alltupps = []\n for k, v in list(d.items()):\n alltupps.append(v, k)\n return alltupps","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":18749,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-03 11:32:27","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n alltupps = []\n for k, v in list(d.items()):\n alltupps.append((v, k))\n return alltupps","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":15588,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-03 11:33:15","func_code":"def swap_unique_keys_values(d):\n dic = {}\n for key, value in list(d.items()):\n if value not in dic:\n dic[value] = key\n else:\n del dic[value]\n return dic","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":20267,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-03 11:33:15","func_code":"def swap_unique_keys_values(d):\n dic = {}\n for key, value in list(d.items()):\n if value not in dic:\n dic[value] = key\n else:\n del dic[value]\n return dic","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":5958,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:35:51","func_code":"def swap_keys_values(swap_me):\n print(list({swap_me[key]: key for key in list(swap_me.keys())}.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":23944,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:36:37","func_code":"def swap_keys_values(swap_me):\n print(list({swap_me[key]: key for key in list(swap_me.keys())}.items())\n .sort(key=lambda x: x[0]))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":20502,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:37:14","func_code":"def swap_keys_values(swap_me):\n o = list({swap_me[key]: key for key in list(swap_me.keys())}.items())\n o.sort(key=lambda x: x[0])\n print(o)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":32480,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:37:50","func_code":"def swap_keys_values(swap_me):\n o = {swap_me[key]: key for key in list(swap_me.keys())}\n o = list(o.items())\n o = list(o)\n o.sort(key=lambda x: x[0])\n print(o)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":32872,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:38:24","func_code":"def swap_keys_values(swap_me):\n if swap_me is not None:\n o = {swap_me[key]: key for key in list(swap_me.keys())}\n o = list(o.items())\n o = list(o)\n o.sort(key=lambda x: x[0])\n print(o)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":36921,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-03 11:38:37","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for k, v in list(in_dict.items()):\n out_dict[v] = k\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":11933,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-03 11:38:37","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for k, v in list(in_dict.items()):\n out_dict[v] = k\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":7234,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:38:56","func_code":"def swap_keys_values(swap_me):\n if swap_me is not None:\n return {swap_me[key]: key for key in list(swap_me.keys())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":1594,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:38:56","func_code":"def swap_keys_values(swap_me):\n if swap_me is not None:\n return {swap_me[key]: key for key in list(swap_me.keys())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":13161,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-03 11:39:56","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blacklist = set()\n for k, v in list(in_dict.items()):\n if v in out_dict:\n blacklist.update([v])\n del out_dict[v]\n elif v not in blacklist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":38004,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-03 11:39:56","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blacklist = set()\n for k, v in list(in_dict.items()):\n if v in out_dict:\n blacklist.update([v])\n del out_dict[v]\n elif v not in blacklist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":35150,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 11:41:45","func_code":"def seen(k, v):\n global skip\n if v in skip:\n return k, v\n else:\n return v, k\n\n\ndef swap_unique_keys_values(d):\n global skip\n check = []\n for x in list(d.keys()):\n if d[x] not in check:\n check.append(d[x])\n else:\n skip.append(d[x])\n d = [seen(k, v) for k, v in list(d.items())]\n print(d)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8245,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:42:04","func_code":"def swap_unique_keys_values(swap_me):\n if swap_me is not None:\n d = {swap_me[key]: key for key in list(set(swap_me.keys)) if\n swap_me[key]}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":35,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:42:29","func_code":"def swap_unique_keys_values(swap_me):\n if swap_me is not None:\n d = {swap_me[key]: key for key in list(set(swap_me.keys())) if\n swap_me[key]}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":41412,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:42:52","func_code":"def swap_unique_keys_values(swap_me):\n if swap_me is not None:\n return {swap_me[key]: key for key in list(set(swap_me.keys())) if\n swap_me[key]}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":11547,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 11:47:41","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":13165,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 11:47:41","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":14271,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 11:51:07","func_code":"def swap_unique_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":9261,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:53:19","func_code":"def swap_unique_keys_values(swap_me):\n if swap_me is not None:\n return {swap_me[key]: key for key in list(swap_me.keys()) if list(\n swap_me.values()).count(swap_me[key]) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":5536,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:53:19","func_code":"def swap_unique_keys_values(swap_me):\n if swap_me is not None:\n return {swap_me[key]: key for key in list(swap_me.keys()) if list(\n swap_me.values()).count(swap_me[key]) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":15443,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-03 12:08:24","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n alltupps = []\n newlist = []\n for k, v in list(d.items()):\n alltupps.append((v, k))\n alltupps = sorted(alltupps)\n i = 0\n while i < len(alltupps) - 1:\n if alltupps[i][0] != alltupps[i + 1][0]:\n newlist.append(alltupps[i])\n else:\n i += 1\n i += 1\n if alltupps[-2][0] != alltupps[-1][0]:\n newlist.append(alltupps[-1])\n return dict(newlist)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":31839,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-03 12:08:24","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n alltupps = []\n newlist = []\n for k, v in list(d.items()):\n alltupps.append((v, k))\n alltupps = sorted(alltupps)\n i = 0\n while i < len(alltupps) - 1:\n if alltupps[i][0] != alltupps[i + 1][0]:\n newlist.append(alltupps[i])\n else:\n i += 1\n i += 1\n if alltupps[-2][0] != alltupps[-1][0]:\n newlist.append(alltupps[-1])\n return dict(newlist)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":31608,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-03 12:31:35","func_code":"def swap_keys_values(x):\n new_d = dict((v, k) for k, v in list(x.items()))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":9309,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-03 12:31:35","func_code":"def swap_keys_values(x):\n new_d = dict((v, k) for k, v in list(x.items()))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":39705,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-03 12:43:35","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":32152,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-03 12:48:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":6906,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-03 12:48:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":26337,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-03 12:48:44","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":4548,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-03 12:48:44","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":37349,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-03 12:48:44","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":26513,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-03 12:55:48","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":36714,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-03 12:55:48","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":477,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-03 12:58:23","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":17636,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-03 12:58:23","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":26298,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 12:58:49","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[keys[i]] = vals[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":15014,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 12:59:19","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":11621,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 12:59:19","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":40628,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-03 12:59:43","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":4629,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-03 12:59:43","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":29199,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-03 12:59:43","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":23537,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-03-03 13:23:25","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":32907,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-03-03 13:23:25","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":23761,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-03-03 13:24:04","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":12317,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-03-03 13:24:04","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":26551,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-03 13:31:47","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n values = []\n keys = []\n for z, q in list(d.items()):\n keys.append(q)\n values.append(z)\n for z, q in list(d.items()):\n if not keys.count(q) > 1:\n new_dict[q] = z\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":4808,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-03 13:31:47","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n values = []\n keys = []\n for z, q in list(d.items()):\n keys.append(q)\n values.append(z)\n for z, q in list(d.items()):\n if not keys.count(q) > 1:\n new_dict[q] = z\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":39293,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-03 13:34:04","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n values = []\n keys = []\n for z, q in list(d.items()):\n keys.append(q)\n values.append(z)\n for z, q in list(d.items()):\n if not keys.count(q) > 1:\n new_dict[q] = z\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":22369,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-03 13:34:04","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n values = []\n keys = []\n for z, q in list(d.items()):\n keys.append(q)\n values.append(z)\n for z, q in list(d.items()):\n if not keys.count(q) > 1:\n new_dict[q] = z\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":34832,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-03 13:46:47","func_code":"def swap_keys_values(d):\n new_dict = {}\n for z, q in list(d.items()):\n new_dict[q] = z\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":5912,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-03 13:46:47","func_code":"def swap_keys_values(d):\n new_dict = {}\n for z, q in list(d.items()):\n new_dict[q] = z\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":22474,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 14:55:53","func_code":"def swap_unique_keys_values(a):\n value = list(a.values())\n keys = list(a.keys())\n dir = {}\n for i in a:\n if values.count(value[i]) < 2:\n dir[value[i]] = keys[i]\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":1847,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 14:56:10","func_code":"def swap_unique_keys_values(a):\n value = list(a.values())\n keys = list(a.keys())\n dir = {}\n for i in a:\n if value.count(value[i]) < 2:\n dir[value[i]] = keys[i]\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":9022,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 14:56:54","func_code":"def swap_unique_keys_values(a):\n value = list(a.values())\n keys = list(a.keys())\n dir = {}\n for i in range(0, len(vaules)):\n if value.count(value[i]) < 2:\n dir[value[i]] = keys[i]\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":5967,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 14:57:18","func_code":"def swap_unique_keys_values(a):\n value = list(a.values())\n keys = list(a.keys())\n dir = {}\n for i in range(0, len(value)):\n if value.count(value[i]) < 2:\n dir[value[i]] = keys[i]\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":31877,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 14:57:18","func_code":"def swap_unique_keys_values(a):\n value = list(a.values())\n keys = list(a.keys())\n dir = {}\n for i in range(0, len(value)):\n if value.count(value[i]) < 2:\n dir[value[i]] = keys[i]\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":32595,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 14:57:18","func_code":"def swap_unique_keys_values(a):\n value = list(a.values())\n keys = list(a.keys())\n dir = {}\n for i in range(0, len(value)):\n if value.count(value[i]) < 2:\n dir[value[i]] = keys[i]\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":33842,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:21:57","func_code":"def swap_keys_values(d):\n new_d = {}\n for key, val in d:\n new_d[val] = key\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":37838,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:28:26","func_code":"def swap_keys_values(d):\n new_d = {}\n for key, val in d.items:\n new_d[val] = key\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":8982,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:28:55","func_code":"def swap_keys_values(d):\n new_d = {}\n for key, val in list(d.items()):\n new_d[val] = key\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":28850,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:28:55","func_code":"def swap_keys_values(d):\n new_d = {}\n for key, val in list(d.items()):\n new_d[val] = key\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":41965,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:38:11","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n dups = []\n for key, val in list(d.items()):\n if val not in dups:\n new_d[val] = key\n dups.append(val)\n else:\n del new_d[val]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":2534,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:38:11","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n dups = []\n for key, val in list(d.items()):\n if val not in dups:\n new_d[val] = key\n dups.append(val)\n else:\n del new_d[val]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":11764,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:38:11","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n dups = []\n for key, val in list(d.items()):\n if val not in dups:\n new_d[val] = key\n dups.append(val)\n else:\n del new_d[val]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":13984,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-03 15:49:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":20309,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-03 15:49:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":3192,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-03 15:49:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":17682,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-03 17:41:24","func_code":"def swap_unique_keys_values(d):\n new_dict = dict()\n for k in d:\n v = d.get[k]\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":28577,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-03 17:46:26","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":12616,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-03 17:46:26","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":9420,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-03 17:46:26","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":13341,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-03 18:03:40","func_code":"def swap_unique_keys_values(d):\n seen = []\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":7299,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-03 18:08:58","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n return {v: k for k, v in list(d.items()) if values.count(v) < 2}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":4938,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-03 18:08:58","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n return {v: k for k, v in list(d.items()) if values.count(v) < 2}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":29918,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-03 18:26:42","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":37124,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-03 18:26:42","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":7963,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-03 18:27:01","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":31270,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-03 18:27:01","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":39540,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-03 18:27:01","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":27131,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 18:28:43","func_code":"def swap_keys_values(d):\n e = {}\n for k, v in d:\n e[v] = k\n return e","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":36734,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 18:30:10","func_code":"def swap_keys_values(d):\n e = {}\n for k, v in list(d.items()):\n e[v] = k\n return e","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":13032,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 18:30:10","func_code":"def swap_keys_values(d):\n e = {}\n for k, v in list(d.items()):\n e[v] = k\n return e","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":8640,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2017-03-03 18:44:04","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":21122,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2017-03-03 18:44:04","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":34332,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2017-03-03 18:44:13","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":8805,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2017-03-03 18:44:13","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":29317,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:46:08","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in d.items())","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":1983,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:46:42","func_code":"def swap_keys_values(d):\n return dict((v, k) for k, v in d.items())","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":2250,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:47:13","func_code":"def swap_keys_values(d):\n return {(v, k) for k, v in d.items()}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":41552,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:48:01","func_code":"def swap_keys_values(d):\n print([(4, 'a'), (7, 'b'), (10, 'c')])","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":40671,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:48:26","func_code":"def swap_keys_values(d):\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":35280,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:48:56","func_code":"def swap_keys_values(d):\n print(dict((v, k) for k, v in d.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":21560,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:50:39","func_code":"def swap_keys_values(d):\n print(dict((v, k) for k, v in list(d.items())))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":21088,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-03 18:51:06","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":17952,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-03 18:51:06","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":3278,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-03 18:52:02","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":11931,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:52:36","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":24620,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-03 18:52:37","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":17930,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-03 18:52:37","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":22339,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-03 18:52:37","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":23990,"user":"f94d128e-c997-4cca-8a7e-2216c3966829","date":"2017-03-03 18:52:52","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":36151,"user":"f94d128e-c997-4cca-8a7e-2216c3966829","date":"2017-03-03 18:52:52","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":5124,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:52:56","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n list(d.items())","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":37633,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-03 18:53:10","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":31468,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-03 18:53:10","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":14714,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-03 18:53:17","func_code":"def swap_keys_values(d):\n return {d[key]: key for key in d}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":15652,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-03 18:53:17","func_code":"def swap_keys_values(d):\n return {d[key]: key for key in d}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":35182,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:53:29","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":28695,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:53:45","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(list(d.items())))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":17865,"user":"f94d128e-c997-4cca-8a7e-2216c3966829","date":"2017-03-03 18:54:29","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":11168,"user":"f94d128e-c997-4cca-8a7e-2216c3966829","date":"2017-03-03 18:54:29","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":32137,"user":"f94d128e-c997-4cca-8a7e-2216c3966829","date":"2017-03-03 18:54:29","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":19880,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:55:33","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(collections.OrderedDict(sorted(list(d.items()), key=lambda t: t[0])))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":29351,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:55:54","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = collections.OrderedDict(sorted(list(d.items()), key=lambda t: t[0]))\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":20593,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:56:01","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = collections.OrderedDict(sorted(list(d.items()), key=lambda t: t[0]))\n print(list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":9299,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:56:16","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = sorted(list(d.items()), key=lambda t: t[0])\n print(list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":39650,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:57:37","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = SortedDict(d)\n print(d.items)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":32357,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:58:07","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":3955,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:59:06","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(list(d.items()), key=sorter))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":4150,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 18:59:39","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n for i in a:\n if a.count(i) == 1:\n a.pop(i)\n e = {}\n for k, v in list(d.items()):\n if v not in a:\n e[v] = k\n return e","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":7236,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:59:56","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(list(d.items()), key=sorter))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":7932,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:00:19","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":30785,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 19:00:32","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n for i in a:\n if a.count(i) == 1:\n a.remove(i)\n e = {}\n for k, v in list(d.items()):\n if v not in a:\n e[v] = k\n return e","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":42001,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:00:41","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = list(d.items())\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":31985,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:01:28","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":34654,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:02:36","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print([k for k, v in sorted(list(d.items()), key=lambda x: x[1],\n reverse=True)])","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":19677,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:03:02","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print([k for k, v in sorted(list(d.items()), key=lambda x: x[1],\n reverse=True)])","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":13987,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:03:12","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print([k for k, v in sorted(list(d.items()), key=lambda x: x[1])])","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":13698,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:03:28","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(list(d.items()), key=lambda x: x[1]))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":6366,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:04:00","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print([(k, v) for k, v in sorted(list(d.items()), key=lambda x: x[1])])","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":28040,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:04:47","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n sd = sorted(d.items())\n print(sd)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":416,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:05:04","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":13730,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:05:19","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(d))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":35588,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:05:47","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = sorted(d)\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":30891,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:09:15","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = sorted(list(d.items()), key=lambda t: t[0])\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":9132,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:11:54","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n new_dict = sorted(list(d.items()), key=lambda t: t[0])\n print(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":21778,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:12:48","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n new_dict = sorted(list(d.items()), key=lambda t: t[0])\n print(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":30246,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:13:09","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n new_dict = sorted(list(d.items()), key=lambda t: t[0])\n print(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":41659,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:13:52","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n new_dict = sorted(list(d.items()), key=lambda t: t[0])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":12167,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:14:06","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n new_dict = sorted(list(d.items()), key=lambda t: t[0])\n print(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":28568,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:14:27","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":17581,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:14:40","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":15842,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:14:59","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(list(d.items()), key=lambda t: t[0]))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":17623,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:16:01","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":38590,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:16:13","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":30444,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:16:31","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":10799,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:16:48","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":8251,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:16:48","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":33084,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-03 19:34:17","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":4112,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-03 19:34:17","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":2431,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-03 19:37:39","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":22370,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-03 19:37:39","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":31244,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-03 19:37:39","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":19587,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 19:57:05","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n for i in a:\n if 1 < a.count(i):\n a.remove(i)\n e = {}\n for k, v in list(d.items()):\n if v in a:\n e[v] = k\n return e","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":26360,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-03 20:00:37","func_code":"def swap_keys_values(d):\n new_d = d((v, k) for k, v in list(d.items()))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":24817,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-03 20:00:37","func_code":"def swap_keys_values(d):\n new_d = d((v, k) for k, v in list(d.items()))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":31150,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-03 20:00:37","func_code":"def swap_keys_values(d):\n new_d = d((v, k) for k, v in list(d.items()))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":24384,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 20:03:02","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n for i in a:\n if 1 < a.count(i):\n a = [j for j in a if j != i]\n e = {}\n for k, v in list(d.items()):\n if v in a:\n e[v] = k\n return e","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":12227,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 20:03:02","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n for i in a:\n if 1 < a.count(i):\n a = [j for j in a if j != i]\n e = {}\n for k, v in list(d.items()):\n if v in a:\n e[v] = k\n return e","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":30059,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 20:03:02","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n for i in a:\n if 1 < a.count(i):\n a = [j for j in a if j != i]\n e = {}\n for k, v in list(d.items()):\n if v in a:\n e[v] = k\n return e","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":23823,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 20:37:36","func_code":"def swap_unique_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":8743,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-03 20:38:15","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":35510,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-03 20:38:15","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":2874,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-03 20:38:59","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":12075,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-03 20:38:59","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":18932,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 20:53:20","func_code":"def swap_unique_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":39367,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 20:54:48","func_code":"def swap_unique_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n new_dict.pop(7, None)\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":12962,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 20:54:48","func_code":"def swap_unique_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n new_dict.pop(7, None)\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":29233,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 20:54:48","func_code":"def swap_unique_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n new_dict.pop(7, None)\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":6172,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-03 21:18:33","func_code":"def swap_keys_values(d):\n new_dict = dict((k, v) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":7577,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-03 21:20:06","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":13062,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-03 21:20:06","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":3133,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-03 21:24:24","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":3576,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-03 21:24:24","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":23363,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-03 21:31:22","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":28910,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-03 21:31:22","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":15592,"user":"7f7b8266-dd5b-41e4-86a0-07e112b10147","date":"2017-03-03 21:32:46","func_code":"def swap_keys_values(my_dict):\n new_dict = {}\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":39914,"user":"7f7b8266-dd5b-41e4-86a0-07e112b10147","date":"2017-03-03 21:32:46","func_code":"def swap_keys_values(my_dict):\n new_dict = {}\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":17538,"user":"7f7b8266-dd5b-41e4-86a0-07e112b10147","date":"2017-03-03 21:32:46","func_code":"def swap_keys_values(my_dict):\n new_dict = {}\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":15402,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-03 21:34:14","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":27133,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-03 21:34:14","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":26747,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-03 21:49:53","func_code":"def swap_keys_values(my_dict):\n new_dict = {}\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":31572,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-03 21:49:53","func_code":"def swap_keys_values(my_dict):\n new_dict = {}\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":40925,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 22:08:24","func_code":"def swap_keys_values(d):\n for c in d:\n tmp == d[key]\n d[key] == value\n value == tmp\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":14411,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 22:09:31","func_code":"def swap_keys_values(d):\n tmp = ''\n for c in d:\n tmp = d[key]\n d[key] = value\n value = tmp\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":33650,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-03 22:27:35","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":13864,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-03 22:27:35","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":31118,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-03 22:28:31","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":28079,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-03 22:28:31","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":27314,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-03 22:28:31","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":38398,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-03 22:51:22","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":1757,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-03 22:52:41","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":18570,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-03 22:52:41","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":41188,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-03 22:55:12","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = {}\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":34617,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-03 22:56:04","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = {}\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":38000,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-03 22:58:22","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = {}\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":271,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-03 23:01:34","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":27771,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-03 23:01:34","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":14871,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-03 23:04:21","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":11580,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-03 23:06:00","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":13,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-03 23:06:00","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":3132,"user":"109505d5-be18-4a61-8318-5d522de4300e","date":"2017-03-03 23:21:03","func_code":"def swap_keys_values(d):\n swapped = {}\n for k, v in list(d.items()):\n swapped[v] = k\n return swapped","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":37115,"user":"109505d5-be18-4a61-8318-5d522de4300e","date":"2017-03-03 23:21:03","func_code":"def swap_keys_values(d):\n swapped = {}\n for k, v in list(d.items()):\n swapped[v] = k\n return swapped","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":14853,"user":"109505d5-be18-4a61-8318-5d522de4300e","date":"2017-03-03 23:21:03","func_code":"def swap_keys_values(d):\n swapped = {}\n for k, v in list(d.items()):\n swapped[v] = k\n return swapped","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":19893,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 23:23:24","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in d.items]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":12977,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 23:24:31","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":33952,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 23:24:31","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":18642,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-03 23:25:05","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":31617,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-03 23:25:05","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":3140,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 23:30:03","func_code":"def swap_keys_values():\n a = [v for k, v in list(d.items())]\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":40608,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 23:30:53","func_code":"def swap_keys_values(d):\n a = [v for k, v in list(d.items())]\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":26486,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 23:30:53","func_code":"def swap_keys_values(d):\n a = [v for k, v in list(d.items())]\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":26313,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:16:19","func_code":"def swap_unique_keys_values(d):\n n_d = {}\n dup = []\n for k in d:\n if k in n_d:\n dup.append(k)\n n_d[d[k]] = k\n for d in dup:\n n_d.pop(d)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":42391,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:16:51","func_code":"def swap_unique_keys_values(d):\n print(d)\n n_d = {}\n dup = []\n for k in d:\n if k in n_d:\n dup.append(k)\n n_d[d[k]] = k\n print(dup)\n for d in dup:\n n_d.pop(d)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37241,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:17:08","func_code":"def swap_unique_keys_values(d):\n print(d)\n n_d = {}\n dup = []\n for k in d:\n if k in n_d:\n dup.append(k)\n n_d[d[k]] = k\n print(dup)\n for d in dup:\n n_d.pop(d)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":2475,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:18:58","func_code":"def swap_unique_keys_values(d):\n print(d)\n n_d = {}\n dup = []\n for k in d:\n if d[k] in n_d:\n dup.append(k)\n n_d[d[k]] = k\n print(dup)\n for x in dup:\n n_d.pop(x)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":1647,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:19:21","func_code":"def swap_unique_keys_values(d):\n print(d)\n n_d = {}\n dup = []\n for k in d:\n if d[k] in n_d:\n dup.append(d[k])\n n_d[d[k]] = k\n print(dup)\n for x in dup:\n n_d.pop(x)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":10790,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:19:38","func_code":"def swap_unique_keys_values(d):\n n_d = {}\n dup = []\n for k in d:\n if d[k] in n_d:\n dup.append(d[k])\n n_d[d[k]] = k\n for x in dup:\n n_d.pop(x)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":34990,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:19:38","func_code":"def swap_unique_keys_values(d):\n n_d = {}\n dup = []\n for k in d:\n if d[k] in n_d:\n dup.append(d[k])\n n_d[d[k]] = k\n for x in dup:\n n_d.pop(x)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":30980,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-06 13:56:23","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":14174,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-06 13:56:23","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":29846,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-06 13:57:38","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":41451,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-06 13:57:38","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":2898,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 17:38:21","func_code":"def swap_keys_values(d):\n for k, v in d.items:\n new_v, new_k = k, v\n return new_v, new_k","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":false} -{"submission_id":9285,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 17:54:25","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":34881,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 17:54:25","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":10284,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 18:06:13","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in d.items]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":4902,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 18:09:30","func_code":"def swap_unique_keys_values(d):\n a = []\n for k, v in d.items:\n a.append(v)\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":7460,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 18:10:16","func_code":"def swap_unique_keys_values(d):\n a = []\n for k, v in list(d.items()):\n a.append(v)\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":19992,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 18:12:03","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":22746,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 18:12:03","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":11786,"user":"fac2ee37-8224-43e0-9c23-7cc249889343","date":"2017-03-07 12:57:17","func_code":"def swap_keys_values(x):\n d = {}\n for k, v in list(x.items()):\n d[v] = k\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":30301,"user":"fac2ee37-8224-43e0-9c23-7cc249889343","date":"2017-03-07 12:57:17","func_code":"def swap_keys_values(x):\n d = {}\n for k, v in list(x.items()):\n d[v] = k\n return d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":27365,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-08 14:43:48","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18583,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-08 14:44:27","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18575,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-08 14:44:53","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":39333,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-08 14:44:53","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":9148,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-08 14:45:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if d < r1 + r2:\n return True\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":30326,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-08 14:45:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if d < r1 + r2:\n return True\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":36915,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 11:16:35","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":39422,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 11:19:36","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":9529,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 11:19:36","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":28064,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-03-10 11:28:08","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":27601,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-03-10 11:28:08","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":19312,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-03-10 11:31:30","func_code":"def append2list(l1, l2=[]):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11570,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-03-10 11:31:30","func_code":"def append2list(l1, l2=[]):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":22932,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-10 11:32:32","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":20004,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-03-10 11:34:08","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":28901,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-03-10 11:34:08","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":1452,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-10 11:34:30","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":22298,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-10 11:35:24","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13174,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-03-10 11:36:21","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":7739,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-03-10 11:36:21","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":27378,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:36:57","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":10129,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-03-10 11:37:16","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n rd = r1 + r2\n if d < rd:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":38387,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-03-10 11:37:28","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":12880,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-03-10 11:37:28","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25463,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:38:09","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":12597,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:38:40","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":41113,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:40:20","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18342,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:40:36","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":33335,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 11:42:04","func_code":"def append2list(l1, l2=[]):\n return l1 + l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":38864,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-10 11:43:58","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":28187,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-10 11:43:58","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":12024,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-10 11:44:52","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31935,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-10 11:44:52","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":14146,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-03-10 11:46:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n print(distance)\n if distance >= r1 + r2:\n return False\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":16709,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:46:45","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":33560,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 11:46:55","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11420,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 11:46:55","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18099,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-10 11:47:05","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":17859,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-10 11:47:05","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40539,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-03-10 11:47:10","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n if distance >= r1 + r2:\n return False\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":8593,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-10 11:47:50","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23894,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-10 11:47:50","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25169,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-03-10 11:48:27","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":37311,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-03-10 11:48:27","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":7248,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 11:48:27","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":2241,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 11:48:39","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13991,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-10 11:48:39","func_code":"def append2list(l1, l2=[]):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13998,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-10 11:49:53","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":34403,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-10 11:50:46","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":9066,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-10 11:50:46","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":39208,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-03-10 11:51:13","func_code":"def append2list(l2, l1=None):\n if l1 == None:\n l1 = []\n for i in l2:\n l1.append(i)\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":34762,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-03-10 11:51:13","func_code":"def append2list(l2, l1=None):\n if l1 == None:\n l1 = []\n for i in l2:\n l1.append(i)\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11830,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-10 11:51:51","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11298,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-10 11:51:51","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18028,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 11:52:17","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":30010,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 11:52:17","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":9970,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:52:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if r1 + r2 < distance:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":40436,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-03-10 11:52:59","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = math.sqrt((x2 - x1) ** 2 + (y2 + y1) ** 2)\n r = r1 + r2\n return d < r","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":7945,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-03-10 11:53:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n A = False\n sumrad = r1 + r2\n xs = (x2 - x1) ** 2\n ys = (y2 - y1) ** 2\n inside = xs + ys\n dis = math.sqrt(inside)\n if dis < sumrad:\n return True\n elif sumrad < dis:\n return A\n elif sumrad == dis:\n return A","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":13485,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-03-10 11:53:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n A = False\n sumrad = r1 + r2\n xs = (x2 - x1) ** 2\n ys = (y2 - y1) ** 2\n inside = xs + ys\n dis = math.sqrt(inside)\n if dis < sumrad:\n return True\n elif sumrad < dis:\n return A\n elif sumrad == dis:\n return A","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":34574,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:53:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if r1 + r2 <= distance:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":29835,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:53:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if r1 + r2 <= distance:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":4370,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-10 11:54:01","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11441,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-10 11:54:22","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18202,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-10 11:54:29","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 == []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":33414,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-03-10 11:54:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (y2 - y1) ** 2 + (x2 - x1) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":26347,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-03-10 11:54:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (y2 - y1) ** 2 + (x2 - x1) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":35996,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-03-10 11:54:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (y2 - y1) ** 2 + (x2 - x1) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":9041,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-03-10 11:54:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) * (x2 - x1)\n y = (y2 - y1) * (y2 - y1)\n xy = x + y\n D = math.sqrt(xy)\n return D","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":24672,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-03-10 11:54:58","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n r = r1 + r2\n return d < r","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":26597,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-03-10 11:54:58","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n r = r1 + r2\n return d < r","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":22191,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 11:55:01","func_code":"def overlap(x1=0, y1=0, r1=1, x2=1, y2=1, r2=1):\n distance_centre = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n distance_radius = (r1 + r2) * (r1 + r2)\n if distance_centre < distance_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":21861,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-10 11:55:11","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":32117,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-10 11:55:11","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13592,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-10 11:55:15","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":16054,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-10 11:55:15","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":4875,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:55:22","func_code":"def append2list(l1, l2=[]):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23928,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:55:31","func_code":"def append2list(l1, l2=[]):\n if l2 == ' ':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":41214,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 11:55:48","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n abs(r1 - r2) <= ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 <= (r1 + r2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":5621,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-03-10 11:55:55","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) * (x2 - x1)\n y = (y2 - y1) * (y2 - y1)\n xy = x + y\n D = math.sqrt(xy)\n if D >= r1 + r2:\n print(False)\n else:\n print(True)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":13696,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-10 11:56:04","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23961,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-10 11:56:04","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":32203,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 11:56:09","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n return abs(r1 - r2) <= ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 <= (r1 + r2\n ) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":25800,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-03-10 11:56:11","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n rd = r1 + r2\n if d < rd:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":6498,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-03-10 11:56:11","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n rd = r1 + r2\n if d < rd:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":160,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:56:14","func_code":"def append2list(l1, l2=[]):\n if l2 == ' ':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18089,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-10 11:56:24","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":29749,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-10 11:56:24","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":14822,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-03-10 11:56:32","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) * (x2 - x1)\n y = (y2 - y1) * (y2 - y1)\n xy = x + y\n D = math.sqrt(xy)\n if D >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":9767,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-03-10 11:56:32","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) * (x2 - x1)\n y = (y2 - y1) * (y2 - y1)\n xy = x + y\n D = math.sqrt(xy)\n if D >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":36390,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:56:47","func_code":"def append2list(l1, l2=[]):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13407,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:57:22","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":4490,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:57:22","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":16728,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 11:57:41","func_code":"def append2list(l1, l2=[]):\n for i in l2:\n l1.append(i)\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":14304,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 11:58:20","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n print(dist < r1 + r2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":19255,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 11:58:33","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n return abs(r1 - r2) <= ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 and ((\n x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 <= (r1 + r2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":6883,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 11:58:33","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n return abs(r1 - r2) <= ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 and ((\n x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 <= (r1 + r2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":42018,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 11:58:42","func_code":"def append2list(l1, l2=[]):\n for i in l2[::-1]:\n l1.append(i)\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":36545,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-10 11:59:03","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25758,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 11:59:13","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n print(dist < r1 + r2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":24893,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-10 11:59:36","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":20907,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-10 11:59:47","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":38688,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 11:59:56","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":1278,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 11:59:56","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":36514,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 12:00:19","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n print((x1, y1, r1, x2, y2, r2))\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n print(dist < r1 + r2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":14136,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-10 12:00:21","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":6710,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-10 12:00:21","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":19671,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:00:22","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25502,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 12:00:52","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n print((x1, y1, r1, x2, y2, r2))\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":155,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:01:02","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":19333,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:01:02","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":3476,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 12:01:03","func_code":"def append2list(l1, l2=[]):\n return l1 + l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":17721,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:01:19","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":3306,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-10 12:01:20","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":27269,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-10 12:01:20","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":27647,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:01:32","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":1263,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-03-10 12:01:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n if distance >= r1 + r2:\n return False\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":36228,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-03-10 12:01:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n if distance >= r1 + r2:\n return False\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":30890,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:02:08","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":39966,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-10 12:02:28","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":33104,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-10 12:02:28","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":6657,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:02:38","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":9264,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:02:57","func_code":"def append2list(l1, l2=[]):\n for i in l2:\n l1.append(i)\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":16043,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 12:03:09","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n l1 = l1.clear()\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":9280,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 12:03:09","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n l1 = l1.clear()\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":933,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 12:03:09","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n l1 = l1.clear()\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18237,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-10 12:03:49","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n return (x1 - x2) ** 2 + (y1 - y2) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":23272,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-10 12:03:49","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n return (x1 - x2) ** 2 + (y1 - y2) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":6162,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:03:50","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18814,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 12:03:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n print(dist < r1 + r2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":32579,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-03-10 12:03:53","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":29927,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-03-10 12:03:53","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":36647,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:04:26","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":20834,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:04:57","func_code":"def append2list(l1=[], l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":41797,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 12:05:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":15868,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 12:05:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":7007,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:05:36","func_code":"def append2list(d1=[], d2=[]):\n for i in d1:\n d2.append(i)\n return d2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":34602,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 12:06:02","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":21717,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 12:06:02","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18724,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:07:55","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13504,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:07:55","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":26735,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:07:58","func_code":"def append2list(l1=[], l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23997,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:08:34","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":377,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:08:34","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":33655,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-10 12:09:06","func_code":"def append2list(l1, l2=[]):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":20167,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-10 12:09:06","func_code":"def append2list(l1, l2=[]):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":8870,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 12:09:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=1, y2=1, r2=1):\n distance_centre = int(sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))\n distance_radius = r1 + r2\n if distance_centre < distance_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":10895,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 12:09:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=1, y2=1, r2=1):\n distance_centre = int(sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))\n distance_radius = r1 + r2\n if distance_centre < distance_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":6596,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 12:09:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=1, y2=1, r2=1):\n distance_centre = int(sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))\n distance_radius = r1 + r2\n if distance_centre < distance_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":27720,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:10:08","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":17856,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:10:08","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":37984,"user":"d2e09b87-6673-4e12-97a7-4a861a6daa84","date":"2017-03-10 12:10:58","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":27613,"user":"d2e09b87-6673-4e12-97a7-4a861a6daa84","date":"2017-03-10 12:10:58","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":16314,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-10 12:11:22","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":20029,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 12:11:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n distance = (x * x + y * y) ** 0.5\n return r > distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":15531,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 12:12:47","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n return r1 + r2 > distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":3516,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 12:12:47","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n return r1 + r2 > distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":19864,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-10 12:13:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n hypotenuse = (x ** 2 + y ** 2) ** 0.5\n return r > hypotenuse","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":38778,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-10 12:13:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n hypotenuse = (x ** 2 + y ** 2) ** 0.5\n return r > hypotenuse","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":2919,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-10 12:13:14","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25939,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-10 12:13:14","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":2262,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-03-10 12:13:58","func_code":"def append2list(l1, l2=None):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11011,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-03-10 12:13:58","func_code":"def append2list(l1, l2=None):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":34009,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 12:15:02","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n circles = (x2 - x1) ** 2 + (y2 - y1) ** 2\n distance = circles ** 1 \/ 2\n length = r1 + r2\n if distance <= length:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":35217,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 12:16:05","func_code":"def dist(x1, y1, x2, y2):\n return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return r1 + r2 > dist(x1, y1, x2, y2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":33361,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 12:16:05","func_code":"def dist(x1, y1, x2, y2):\n return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return r1 + r2 > dist(x1, y1, x2, y2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":12354,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-10 12:17:55","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if r1 + r2 <= sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2):\n return False\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":38169,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-10 12:17:55","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if r1 + r2 <= sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2):\n return False\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":205,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:18:46","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) \/\/ 2\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":32027,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-10 12:18:58","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if x2 is _A:\n x2 = 0\n if r1 is _A:\n r1 = 1\n if y2 is _A:\n y2 = 0\n if y1 is _A:\n y1 = 0\n if r2 is _A:\n r2 = 1\n if (x2 - x1) ** 2 + (y2 - y1) ** 2 >= (r1 + r2) ** 2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":9740,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-10 12:18:58","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if x2 is _A:\n x2 = 0\n if r1 is _A:\n r1 = 1\n if y2 is _A:\n y2 = 0\n if y1 is _A:\n y1 = 0\n if r2 is _A:\n r2 = 1\n if (x2 - x1) ** 2 + (y2 - y1) ** 2 >= (r1 + r2) ** 2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":41149,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 12:19:12","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n circles = (x2 - x1) ** 2 + (y2 - y1) ** 2\n distance = circles ** 1 \/ 2\n length = r1 + r2\n if distance < length:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":5238,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:19:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) \/\/ 2\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":16243,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:19:58","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p < dist_r:\n print(True)\n else:\n print(False)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":12742,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-10 12:20:22","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18113,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:20:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) \/\/ 2\n print(diatance)\n print(r1)\n print(r2)\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":668,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:20:48","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) \/\/ 2\n print(distance)\n print(r1)\n print(r2)\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":30979,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:20:48","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":29973,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-03-10 12:21:08","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":20723,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-03-10 12:21:08","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":40108,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:21:14","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":32566,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-10 12:21:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n distance = (x ** 2 + y ** 2) ** 0.5\n return r > distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":2904,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-10 12:21:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n distance = (x ** 2 + y ** 2) ** 0.5\n return r > distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":12900,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-10 12:22:20","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40928,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-10 12:22:29","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":36863,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:22:29","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p <= dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":29591,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-10 12:23:29","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":5644,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:23:55","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n return r == d","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":142,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-10 12:24:00","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":24486,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-10 12:24:00","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":33068,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:24:20","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n return d >= r or d < r","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":1469,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:25:16","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n print(distance)\n print(r1)\n print(r2)\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":4587,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-10 12:25:17","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":26049,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-10 12:25:17","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":10097,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-10 12:25:17","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":32425,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:26:21","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n print(distance)\n print(r1 + r2)\n print(r1 - r2)\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":33449,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:26:33","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n return r != d","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":28584,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-10 12:26:36","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for item in l1:\n l2.append(item)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":39794,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-10 12:26:36","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for item in l1:\n l2.append(item)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":37428,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:27:01","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n if d >= r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":41427,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:27:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":36908,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:28:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n if d >= r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":7087,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:28:10","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":665,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:28:35","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n return d >= r or d < r","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":24137,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-10 12:28:46","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":29957,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:28:53","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n return d >= r or d < r","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":40836,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:29:32","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p <= dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":9866,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:29:34","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n if d >= r:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":37890,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:29:34","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n if d >= r:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":21830,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:29:50","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n print('{} {} {} {} {} {}'.format(x1, y1, r1, x2, y2, r2))\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":36167,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 12:30:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n circles = (x2 - x1) ** 2 + (y2 - y1) ** 2\n distance = math.sqrt(circles)\n length = r1 + r2\n if distance < length:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":14173,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 12:30:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n circles = (x2 - x1) ** 2 + (y2 - y1) ** 2\n distance = math.sqrt(circles)\n length = r1 + r2\n if distance < length:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":1487,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 12:30:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n circles = (x2 - x1) ** 2 + (y2 - y1) ** 2\n distance = math.sqrt(circles)\n length = r1 + r2\n if distance < length:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":32716,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:31:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance or r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":26670,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:32:11","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":39627,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:32:11","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":20946,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:32:11","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":22724,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:32:28","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance or r2 - r1 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":21695,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-10 12:33:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":13320,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-10 12:33:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":11915,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:33:18","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":1527,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 12:33:32","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":29838,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-10 12:33:49","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n l2.append(l1)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":21534,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:34:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2\n rneg = r1 - r2\n if d == rpos:\n return True\n elif d != rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":10542,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-10 12:34:06","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n distance = (x ** 2 + y ** 2) ** 0.5\n return r > distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":10699,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-10 12:34:06","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n distance = (x ** 2 + y ** 2) ** 0.5\n return r > distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":1309,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-10 12:34:06","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n distance = (x ** 2 + y ** 2) ** 0.5\n return r > distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":3962,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:34:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = abs((x2 - x1) ** 2)\n y = abs((y2 - y1) ** 2)\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":38114,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:34:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2\n rneg = r1 - r2\n if d == rpos:\n return True\n elif d == rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":39436,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 12:34:50","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":26083,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:34:58","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":33409,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-10 12:34:58","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(l1)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":36055,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-10 12:35:10","func_code":"def overlap(x1=0, x2=0, r1=1, y1=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n return distance < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":23633,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-10 12:35:38","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40046,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-10 12:35:38","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":22545,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 12:35:51","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":26445,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-10 12:37:36","func_code":"def overlap(x1=0, x2=0, r1=1, y1=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":37897,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-10 12:37:57","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":28652,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:38:49","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 == distance or abs(r1 - r2) == distance and distance < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":13914,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:39:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 == distance or abs(r1 - r2) == distance and distance <= r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":9681,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-10 12:39:42","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":4261,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-10 12:39:42","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":17068,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-10 12:39:42","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":11008,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:39:54","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2 - 1\n rneg = r1 - r2 + 1\n if d == rpos:\n return True\n elif d == rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":19917,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:40:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2 - 1\n rneg = r1 - r2\n if d == rpos:\n return True\n elif d == rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":35862,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:41:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if (r1 + r2 == distance or abs(r1 - r2) == distance\n ) and distance <= r1 + r2 - 1:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":23015,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:41:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if (r1 + r2 == distance or abs(r1 - r2) == distance\n ) and distance == r1 + r2 - 1:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":20823,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:42:19","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if (r1 + r2 == distance or abs(r1 - r2) == distance\n ) and distance == r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":14492,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-10 12:42:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":34084,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-10 12:42:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":4075,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:42:40","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if (r1 + r2 == distance or abs(r1 - r2) == distance\n ) and distance <= r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":34687,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:43:57","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":27519,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-10 12:44:12","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":18091,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-10 12:44:12","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":3047,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-10 12:44:12","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":22285,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:45:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2 + 1) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":11331,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-10 12:45:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":13107,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-10 12:45:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":36458,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-10 12:45:12","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":35470,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-10 12:45:12","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":12436,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:46:45","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":28477,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:47:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2 - 1\n rneg = r1 - r2\n if d == rpos:\n return True\n elif d == rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":5669,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:47:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2 - 1\n rneg = r1 - r2\n if d == rpos:\n return True\n elif d == rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":30584,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:47:55","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2 - 1) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":19976,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:48:08","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":5765,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:48:08","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":28806,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:48:08","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":2291,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 12:50:59","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) < (r1 + r2) * (r1 + r2\n )","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":23937,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-10 12:53:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n return distance < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":2287,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-10 12:53:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n return distance < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":42204,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-10 13:05:56","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":7191,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:09:02","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":1677,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:09:02","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31937,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-10 13:17:16","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":20307,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-10 13:17:16","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":1015,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:30:19","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n r = r1 + r2\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n l = (x + y) ** 1 \/ 2\n return l < r","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":3303,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:30:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n r = r1 + r2\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n l = (x + y) ** 1 \/ 2\n return l <= r","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":19346,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:31:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n r = r1 + r2\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n l = (x + y) ** 0.5\n return l <= r","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":20884,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:31:23","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n r = r1 + r2\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n l = (x + y) ** 0.5\n return l < r","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":12387,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:31:23","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n r = r1 + r2\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n l = (x + y) ** 0.5\n return l < r","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":707,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:43:51","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":32498,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:48:12","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n print(l2)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":14114,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:48:41","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n print(l2)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23459,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:55:36","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n ls = []\n for i in l1:\n l2.append(i)\n print(l2)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13491,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:56:21","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n print(l2)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":33353,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:56:38","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40760,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:56:38","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":22363,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 15:06:24","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) < (r1 + r2) * (r1 + r2):\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":11030,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 15:08:01","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n elif y1 is _A:\n y1 = 0\n elif r1 is _A:\n r1 = 1\n if (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) < (r1 + r2) * (r1 + r2):\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":19581,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 15:12:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) < (r1 + r2) * (r1 + r2):\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":23304,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 15:12:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) < (r1 + r2) * (r1 + r2):\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":21589,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-10 15:18:49","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25974,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-10 15:21:49","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":36897,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-10 15:26:55","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":10039,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-10 15:26:55","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":33746,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-03-10 15:52:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":15661,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-03-10 15:52:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":15144,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-03-10 15:54:05","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31453,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-03-10 15:54:05","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":39727,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-03-10 16:59:38","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":24520,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-03-10 16:59:38","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":6164,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-03-10 17:07:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rdistance = r1 + r2\n cdistance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if cdistance < rdistance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":21097,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-03-10 17:07:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rdistance = r1 + r2\n cdistance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if cdistance < rdistance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":20216,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-10 18:01:07","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":41669,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-10 18:03:12","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":10066,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-10 18:06:26","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18016,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-10 18:06:26","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25782,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-10 19:59:50","func_code":"def append2list(l1, l2=None):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":5111,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-10 19:59:50","func_code":"def append2list(l1, l2=None):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":38860,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-10 19:59:50","func_code":"def append2list(l1, l2=None):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23629,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-03-10 22:31:40","func_code":"def append2list(l1, l2=[]):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11282,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-03-10 22:31:40","func_code":"def append2list(l1, l2=[]):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40789,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-03-10 23:12:32","func_code":"def append2list(l1, l2=None):\n l2 = l2 or []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":1625,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-03-10 23:12:32","func_code":"def append2list(l1, l2=None):\n l2 = l2 or []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":28838,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-03-10 23:18:23","func_code":"def distance(x1, y1, x2, y2):\n return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y=0, r2=1):\n return distance(x1, y1, x2, y2) < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":32256,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-03-10 23:18:41","func_code":"def distance(x1, y1, x2, y2):\n return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return distance(x1, y1, x2, y2) < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":17191,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-03-10 23:18:41","func_code":"def distance(x1, y1, x2, y2):\n return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return distance(x1, y1, x2, y2) < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":22848,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-11 00:09:58","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n c = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if c > r1:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":12517,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-11 00:10:42","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n c = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if c > r1 or c > r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":30971,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-11 00:11:00","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n c = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if c > r1:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":15179,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-11 00:15:40","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n c = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if c > r1 and c > r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":20288,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-11 00:15:40","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n c = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if c > r1 and c > r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":39244,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-11 00:15:40","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n c = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if c > r1 and c > r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":33701,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-11 15:22:39","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":3620,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-11 15:22:39","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":44,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-11 16:46:44","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25031,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-11 17:00:07","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":202,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-11 17:00:07","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":7585,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-11 17:11:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":32332,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-11 17:11:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":36343,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-11 18:38:31","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":16829,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-11 18:41:26","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23656,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-11 18:41:26","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11871,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-11 18:51:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return bool(math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":27784,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-11 18:51:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return bool(math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":25902,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:50:22","func_code":"def search(list, num):\n i = 0\n while i < len(list):\n if list[i] == num:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"funcs.py_ca278_search","academic_year":2016,"module":"ca278","test":"","description":null,"correct":true} -{"submission_id":21953,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:50:22","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":34248,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:50:22","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"funcs.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":true} -{"submission_id":4043,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":16931,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"funcs.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":true} -{"submission_id":2860,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"funcs.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":true} -{"submission_id":201,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def search(list, num):\n i = 0\n while i < len(list):\n if list[i] == num:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"funcs.py_ca278_search","academic_year":2016,"module":"ca278","test":"","description":null,"correct":true} -{"submission_id":6848,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"funcs.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":true} -{"submission_id":28981,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":91,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def search(list, num):\n i = 0\n while i < len(list):\n if list[i] == num:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"funcs.py_ca278_search","academic_year":2016,"module":"ca278","test":"","description":null,"correct":true} -{"submission_id":15712,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":3693,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def search(list, num):\n i = 0\n while i < len(list):\n if list[i] == num:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"funcs.py_ca278_search","academic_year":2016,"module":"ca278","test":"","description":null,"correct":true} -{"submission_id":69,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-12 01:05:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":31439,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-12 01:05:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":37494,"user":"3a14771a-b55c-44f8-97ab-0376389e494c","date":"2017-03-12 10:56:24","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23920,"user":"3a14771a-b55c-44f8-97ab-0376389e494c","date":"2017-03-12 10:56:24","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23539,"user":"3a14771a-b55c-44f8-97ab-0376389e494c","date":"2017-03-12 10:56:24","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":16196,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-12 13:35:33","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13828,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-12 13:35:33","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":19342,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-12 13:35:33","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":8158,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-12 18:52:36","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":32359,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-12 18:52:36","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":20378,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-12 19:21:46","func_code":"def distance_between_points(x1, y1, x2, y2):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = distance_between_points(x1, y1, x2, y2)\n return distance < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":3900,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-12 19:58:44","func_code":"def distance_between_points(x1, y1, x2, y2):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = distance_between_points(x1, y1, x2, y2)\n return distance < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":19191,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-12 19:58:44","func_code":"def distance_between_points(x1, y1, x2, y2):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = distance_between_points(x1, y1, x2, y2)\n return distance < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":12776,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 09:21:36","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n dist = math.sqrt(x2 - x1) ** 2 + (y2 - y1) ** 2\n if dist < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":14775,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-03-13 09:29:18","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":9153,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-03-13 09:38:52","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":1516,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-03-13 09:38:52","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40490,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-03-13 09:51:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":35664,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-03-13 09:51:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":26018,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:24:11","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2) ** 0.5 + (y2 - y1) ** 2\n if dist < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":13438,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:25:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2) ** 0.5 + (y2 - y1) ** 2\n if dist < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":7339,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:25:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2) ** 0.5 + (y2 - y1) ** 2\n if dist <= r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":3675,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:25:42","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2) ** 0.5 + (y2 - y1) ** 2\n if dist < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":14313,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:30:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = (x2 - x1) ** 2 + (y2 - y1) ** 2\n dist2 = dist ** 0.5\n if dist2 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":22279,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:30:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = (x2 - x1) ** 2 + (y2 - y1) ** 2\n dist2 = dist ** 0.5\n if dist2 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":20624,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:39:49","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25472,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:43:31","func_code":"def append2list(w, alist=[]):\n alist.append(w)\n return alist","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":22578,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:43:52","func_code":"def append2list(w, alist=[]):\n alist.append(w)\n return alist","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":11530,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:44:23","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":5168,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:48:04","func_code":"def append2list(l1, l2=None):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":8295,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:49:47","func_code":"def append2list(l1, l2=None):\n for i in l1:\n if l2 is None:\n l2 = []\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":19027,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:49:47","func_code":"def append2list(l1, l2=None):\n for i in l1:\n if l2 is None:\n l2 = []\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":29961,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:30:17","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":27527,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:31:50","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":18853,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:34:28","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = (r1 + r2) ** 2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":31346,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:36:52","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p1 = (x2 - x1) ** 2\n dist_p2 = (y2 - y1) ** 2\n dist_p = (dist_p1 + dist_p2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":17729,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:40:11","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":17330,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:40:46","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":39107,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:40:46","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":33905,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:40:46","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":39830,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-13 16:06:35","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":26529,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-13 16:06:35","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":27275,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-13 16:13:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rad = (r1 + r2) ** 2\n xs = (x1 - x2) ** 2\n ys = (y1 - y2) ** 2\n both_x_y = xs + ys\n if rad > both_x_y:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":6546,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-13 16:13:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rad = (r1 + r2) ** 2\n xs = (x1 - x2) ** 2\n ys = (y1 - y2) ** 2\n both_x_y = xs + ys\n if rad > both_x_y:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":20924,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-03-13 18:40:01","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":38248,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-03-13 18:40:01","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":19981,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-03-13 19:05:56","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":30454,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-03-13 19:05:56","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":35817,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-03-13 19:35:40","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":12947,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-03-13 19:35:40","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":16056,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-03-13 19:35:40","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":8195,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-03-13 21:05:34","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2) < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":22394,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-03-13 21:05:34","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2) < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":24464,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:38:14","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":41445,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-14 10:38:38","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":686,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:39:49","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":34865,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-14 10:40:41","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11884,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:42:10","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":41488,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:42:10","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":2072,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-14 10:42:27","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":20265,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-14 10:42:27","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":35950,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 10:50:30","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=0):\n return x2 - x1 + (y2 - y1) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":5169,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 10:51:26","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return x2 - x1 + (y2 - y1) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":34150,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:56:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=0):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 < r1 + r2:\n return 'False'\n else:\n return 'True'","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":16625,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-14 10:56:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance_centre = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n distance_radius = r1 + r2\n return distance_radius > distance_centre","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":23118,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-14 10:56:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance_centre = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n distance_radius = r1 + r2\n return distance_radius > distance_centre","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":27550,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:57:01","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=0):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 <= r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":38031,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:57:16","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=0):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 < r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":6669,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:57:35","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=0):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 <= r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":15005,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:58:16","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 <= r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":4953,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:58:28","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 < r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":23407,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:58:53","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 <= r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":24532,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:59:10","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 < r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":7809,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 11:02:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n r = r1 + r2\n if d < r:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":38585,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 11:02:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n r = r1 + r2\n if d < r:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":8365,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:10:41","func_code":"def append2list(l1, l2=None):\n l2 = l2 or []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40312,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:10:41","func_code":"def append2list(l1, l2=None):\n l2 = l2 or []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":22367,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:14:24","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n distanceX = x1 - x2\n distanceY = y1 - y2\n radiusSum = circle.Radius + Radius\n return (distanceX * distanceX + distanceY * distanceY <= radiusSum *\n radiusSum)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":33723,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:14:47","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n distanceX = x1 - x2\n distanceY = y1 - y2\n radiusSum = r1 + r2\n return (distanceX * distanceX + distanceY * distanceY <= radiusSum *\n radiusSum)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":9855,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:15:25","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n distanceX = x1 - x2\n distanceY = y1 - y2\n radiusSum = r1 + r2\n print((x1, x2, y1, y2, r1, r2))\n return (distanceX * distanceX + distanceY * distanceY <= radiusSum *\n radiusSum)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":32602,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:21:13","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n return (x1 - x2) ** 2 + (y1 - y2) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":22925,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:21:13","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n return (x1 - x2) ** 2 + (y1 - y2) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":2405,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:27:17","func_code":"def append2list(l1, l2=[]):\n l = l2\n for i in l1:\n l.append(i)\n return l","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":4596,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:29:17","func_code":"def append2list(l1, l2=[]):\n l = []\n l = l2\n for i in l1:\n l.append(i)\n return l","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":7220,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:32:09","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l.append(i)\n return l","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":23583,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:32:37","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":41126,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:33:30","func_code":"def append2list(l1, l2=[]):\n l = l2\n for i in l1:\n l.append(i)\n return l","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":9669,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:33:48","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":42170,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:33:48","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":27437,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:45:35","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 + y2) ** 2) ** 0.5\n if r1 + r2 >= dis:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":10749,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:47:31","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 + y2) ** 2) ** 0.5\n if r1 + r2 > dis:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":35786,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:54:52","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 + y2) ** 2) ** 0.5\n if r1 + r2 > dis and dis != 0:\n return True\n elif dis == 0 and r1 == r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":25771,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:55:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 + y2) ** 2) ** 0.5\n if r1 + r2 >= dis and dis != 0:\n return True\n elif dis == 0 and r1 == r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":27900,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:56:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 + y2) ** 2) ** 0.5\n if r1 + r2 > dis and dis != 0:\n return True\n elif dis == 0 and r1 == r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":2450,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:58:50","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n if r1 + r2 > dis and dis != 0:\n return True\n elif dis == 0 and r1 == r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":22787,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:59:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n if r1 + r2 > dis and dis != 0:\n return True\n elif dis == 0 and r1 == r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":31817,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:59:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n if r1 + r2 >= dis and dis != 0:\n return True\n elif dis == 0 and r1 == r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":75,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 12:01:16","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n if r1 + r2 > dis:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":8563,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 12:01:16","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n if r1 + r2 > dis:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":18226,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2017-03-14 12:46:23","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":21012,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2017-03-14 12:53:41","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31728,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2017-03-14 12:53:41","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":7982,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:18:45","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":27448,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:18:45","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":21967,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-14 13:24:15","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40894,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-14 13:24:15","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":38719,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:26:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return x2 - x1 + (y2 - y1) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":40172,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-14 13:29:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)\n if a >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":19354,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-14 13:29:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)\n if a >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":4794,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:30:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n print((type(x1), type(y1), type(r1), type(x2), type(y2), type(r2)))","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":27323,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:32:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n print((x1, y1, r1, x2, y2, r2))","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":11102,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:34:01","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 < (x0 - x1) ** 2 + (y0 - y1) ** 2 < (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":17651,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-14 13:34:16","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":3519,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:34:16","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return x1, y1, r1, x2, y2, r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":31053,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:34:20","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 < (x0 - x1) ** 2 + (y0 - y1) ** 2 < (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":8617,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:34:32","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 <= (x0 - x1) ** 2 + (y0 - y1) ** 2 <= (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":24147,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:35:02","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 <= (x0 - x1) ** 2 + (y0 - y1) ** 2 < (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":12713,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:35:17","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 <= (x0 - x1) ** 2 + (y0 - y1) ** 2 < (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":33933,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:35:27","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return x2 - x1 + (y2 - y1) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":40992,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-14 13:35:59","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":6584,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-14 13:36:36","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":21020,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-14 13:36:36","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":9966,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:37:10","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return x2 - x1 + (y2 - y1) ** 0.5 < float(r1 + r2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":26358,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:37:57","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (x2 - x1 + (y2 - y1)) ** 0.5 < float(r1 + r2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":5312,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 13:38:19","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23974,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:39:38","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return float((x2 - x1 + (y2 - y1)) ** 0.5) < float(r1 + r2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":25933,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:40:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return int((x2 - x1 + (y2 - y1)) ** 0.5) < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":6794,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:41:12","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (x2 - x1 + (y2 - y1)) ** 0.5","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":32576,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:42:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (x2 - x1 + (y2 - y1)) ** 0.5 \/\/ 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":37675,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:43:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (x2 - x1 + (y2 - y1)) ** 0.5 \/ 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":31931,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 13:43:34","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":29931,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:44:30","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (x2 - x1 + (y2 - y1)) ** 0.5 \/ 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":35387,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:47:38","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (x2 - x1 + (y2 - y1)) ** 0.5 \/ 2\n radii = r1 + r2\n print((distance, radii))","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":13447,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:49:14","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n print((distance, radii))","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":19410,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:49:17","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 <= (x0 - x1) ** 2 + (y0 - y1) ** 2 <= (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":5963,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:49:33","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 <= (x0 - x1) ** 2 + (y0 - y1) ** 2 < (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":32983,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:50:02","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if R0 - R1 <= x0 - x1 + (y0 - y1) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":35233,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:50:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance > radii","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":26855,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:50:22","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance < radii","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":927,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:50:22","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance < radii","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":24111,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 13:52:08","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":30498,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 13:52:41","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":8348,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:52:42","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if R0 - R1 <= x0 - x1 + (y0 - y1) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":30759,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:53:08","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if R0 - R1 <= x0 - x1 + (y0 - y1) or x0 + x1 + (y0 + y1) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":15200,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:53:36","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if R0 - R1 <= x0 - x1 + (y0 - y1) or x0 - x1 + (y0 - y1) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":20554,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 13:53:43","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":10518,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:53:52","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if R0 - R1 <= x0 - x1 + (y0 - y1) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":11770,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 13:54:36","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23173,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:54:44","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":3314,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:55:03","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":17004,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:56:00","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) <= R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":4732,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:56:09","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":6704,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:57:12","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":9278,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 13:57:49","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rad = (r1 + r2) ** 2\n xs = (x1 - x2) ** 2\n ys = (y1 - y2) ** 2\n both_x_y = xs + ys\n if rad > both_x_y:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":11337,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 13:57:49","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rad = (r1 + r2) ** 2\n xs = (x1 - x2) ** 2\n ys = (y1 - y2) ** 2\n both_x_y = xs + ys\n if rad > both_x_y:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":2685,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-14 13:58:58","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":6797,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:00:53","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":2974,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:11:28","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n A = False\n try:\n overlap = A\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap\n except KeyError:\n print(A)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":35902,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:12:09","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n try:\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap\n except KeyError:\n print(True)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":33800,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:12:36","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n A = False\n try:\n overlap = A\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap\n except TypeError:\n print(A)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":25340,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:13:02","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n try:\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap\n except TypeError:\n print(True)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":16296,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:14:12","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n A = False\n try:\n overlap = A\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap\n except TypeError:\n print(A)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":10867,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-14 14:17:01","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":32181,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:17:50","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n A = False\n try:\n overlap = A\n if math.sqrt((int(x0) - int(x1)) ** 2 + (int(y0) - int(y1)) ** 2\n ) < int(R0) + int(R1):\n overlap = True\n return overlap\n except TypeError:\n print(A)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":40517,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-14 14:19:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n return r1 + r2 < distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":10369,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 14:19:21","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":32683,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:20:12","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n A = False\n try:\n overlap = True\n if math.sqrt((int(x0) - int(x1)) ** 2 + (int(y0) - int(y1)) ** 2\n ) < int(R0) + int(R1):\n overlap = A\n return overlap\n except TypeError:\n print(A)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":29613,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-14 14:21:13","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n return r1 + r2 > distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":36741,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-14 14:21:13","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n return r1 + r2 > distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":24964,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:22:02","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n A = False\n try:\n overlap = A\n if math.sqrt((int(x1) - int(x0)) ** 2 + (int(y1) - int(y0)) ** 2\n ) < int(R0) + int(R1):\n overlap = True\n return overlap\n except TypeError:\n print(A)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":31077,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:23:04","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n try:\n overlap = False\n if math.sqrt((int(x1) - int(x0)) ** 2 + (int(y1) - int(y0)) ** 2\n ) < int(R0) + int(R1):\n overlap = True\n return overlap\n except TypeError:\n pass","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":4300,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 14:23:52","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":21678,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 14:23:52","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":5154,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 14:23:52","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":33584,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:38:27","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n try:\n overlap = False\n if math.sqrt((x1 - x0) ** 2 + (y1 - y0) ** 2) < R0 + R1:\n overlap = True\n return overlap\n except TypeError:\n pass","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":30421,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:39:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n try:\n overlap = False\n if math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2:\n overlap = True\n return overlap\n except TypeError:\n pass","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":36484,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:39:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n try:\n overlap = False\n if math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2:\n overlap = True\n return overlap\n except TypeError:\n pass","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":2328,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-14 14:39:38","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n overlap = False\n if math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) < r1 + r2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":21653,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-14 15:00:43","func_code":"def append2list(l1, l2=[]):\n empty = []\n for i in l2:\n empty.append(i)\n for i in l1:\n empty.append(i)\n return empty","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18219,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-14 15:00:43","func_code":"def append2list(l1, l2=[]):\n empty = []\n for i in l2:\n empty.append(i)\n for i in l1:\n empty.append(i)\n return empty","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":32717,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-14 15:01:05","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n overlap = False\n if math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) < r1 + r2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":19627,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-14 15:01:05","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n overlap = False\n if math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) < r1 + r2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":19142,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-14 15:04:11","func_code":"def append2list(l1, l2=[][:]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":4028,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-14 15:05:06","func_code":"def append2list(l1, l2=[][:]):\n return l1 + l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":30114,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-14 15:05:27","func_code":"def append2list(l1, l2=[][:]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":14635,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-14 15:05:27","func_code":"def append2list(l1, l2=[][:]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":42409,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-14 15:05:27","func_code":"def append2list(l1, l2=[][:]):\n return l2 + l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":36474,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-14 15:13:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n circles = r1 + r2\n if distance < circles:\n print(True)\n else:\n print(False)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":35704,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-14 15:13:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n circles = r1 + r2\n if distance < circles:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":37044,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-14 15:13:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n circles = r1 + r2\n if distance < circles:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":23042,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-14 15:17:25","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (x1 - x2) ** 2 + (y1 - y2) ** 2\n if (r1 + r2) ** 2 > distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":39021,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-14 15:17:25","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (x1 - x2) ** 2 + (y1 - y2) ** 2\n if (r1 + r2) ** 2 > distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":10110,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-14 15:46:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2 - 1\n rneg = r1 - r2\n if d == rpos:\n return True\n elif d == rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":26113,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-14 15:47:39","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2\n return d < rpos","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":36408,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-14 15:47:39","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2\n return d < rpos","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":19773,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 15:55:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance < radii","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":18275,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 15:55:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance < radii","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":31974,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 15:58:25","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":9663,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 16:03:43","func_code":"def append2list(l1, l2=None):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":16410,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 16:03:43","func_code":"def append2list(l1, l2=None):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":33366,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 16:03:43","func_code":"def append2list(l1, l2=None):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":4228,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 16:23:21","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":5352,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 16:23:21","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31867,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 16:23:21","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18247,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-14 19:20:28","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":39751,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-14 19:20:28","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25664,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-14 20:44:47","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":6038,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-14 20:44:47","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31876,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-14 20:58:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if dis < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":9549,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-14 20:58:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if dis < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":36445,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-14 21:03:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if float(r1) > distance - r2 and float(r2) > distance - r1:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":14924,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-14 21:03:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if float(r1) > distance - r2 and float(r2) > distance - r1:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":28580,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-14 21:03:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if float(r1) > distance - r2 and float(r2) > distance - r1:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":3267,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-14 21:06:19","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":3682,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-14 21:06:19","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":26705,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 21:11:45","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":980,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 21:11:45","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"funcs.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":true} -{"submission_id":11312,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 21:13:05","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 1\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 1\n return l3","func_name":"merge_lists","assignment_id":"funcs.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":false} -{"submission_id":23781,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 21:13:05","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":15415,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-14 21:16:24","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":40135,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-14 21:16:24","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":23219,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"funcs.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":true} -{"submission_id":3396,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"funcs.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":true} -{"submission_id":4569,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"funcs.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":true} -{"submission_id":31431,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":4025,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":42389,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":14644,"user":"cc092be9-9a93-44dc-8aef-c2a75acd4b48","date":"2017-03-15 10:45:37","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":30772,"user":"cc092be9-9a93-44dc-8aef-c2a75acd4b48","date":"2017-03-15 10:46:06","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":24531,"user":"cc092be9-9a93-44dc-8aef-c2a75acd4b48","date":"2017-03-15 10:46:06","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":8566,"user":"cc092be9-9a93-44dc-8aef-c2a75acd4b48","date":"2017-03-15 10:46:06","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31644,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-15 11:59:55","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":5654,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-15 12:01:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":24599,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-15 12:01:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":16729,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-15 12:20:11","func_code":"def append2list(l1, l2=[]):\n if l2 != None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":15670,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-15 12:24:16","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11176,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:26:51","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":4577,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-15 12:28:19","func_code":"def append2list(l1, l2=[]):\n if l2 != None:\n if len(l2) > 1:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":33836,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-15 12:29:41","func_code":"def append2list(l1, l2=[]):\n if len(l2) > 1:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":18931,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-15 12:29:41","func_code":"def append2list(l1, l2=[]):\n if len(l2) > 1:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":13297,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:29:50","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13939,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:32:21","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":4223,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:33:56","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":33171,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:35:26","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":24255,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:36:59","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31673,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:38:24","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":12608,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:42:06","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":28605,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:44:29","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":36193,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:44:29","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":9733,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:44:29","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25692,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:09:32","func_code":"def append2list(l1, l2=None):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":36450,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:09:55","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":37298,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:16:19","func_code":"def append2list(l1, l2=None):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":22873,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:17:49","func_code":"def append2list(l1, l2):\n for i in l1:\n l2.append(i)\n return l2\n if l2 is None:\n l2 = []","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":30768,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:21:04","func_code":"def append2list(l1, l2):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":17743,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:21:38","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23175,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:22:08","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31741,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:22:31","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":10844,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:24:04","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":1713,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:30:59","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":33082,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:30:59","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":5019,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-15 14:04:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n sumofradi = r1 + r2\n return distance < sumofradi","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":18469,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-15 14:04:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n sumofradi = r1 + r2\n return distance < sumofradi","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":31208,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-15 14:04:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n sumofradi = r1 + r2\n return distance < sumofradi","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":22226,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-15 14:41:18","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2\n return d < rpos","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":13036,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-15 14:41:18","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2\n return d < rpos","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":9911,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 19:55:28","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25245,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 19:58:45","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n else:\n l2 = l2\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":17089,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 19:58:45","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n else:\n l2 = l2\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11088,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 20:12:59","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1 ** 2)) ** 1 \/ 2 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":4007,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 20:31:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2\n total_radius = r1 + r2\n if distance < total_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":25956,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 20:40:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n total_radius = r1 + r2\n print((x1, y1, r1, x2, y2, r2))\n print((total_radius, distance))\n if distance < total_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":25484,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 20:40:15","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n total_radius = r1 + r2\n if distance < total_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":22444,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 20:40:15","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n total_radius = r1 + r2\n if distance < total_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":41431,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-15 21:24:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (abs((x2 - x1) ** 2) + abs((y2 - y1) ** 2)) ** 0.5\n if r1 + r2 > distance and abs(r1 - r2) <= distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":6348,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-15 21:27:28","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (abs((x2 - x1) ** 2) + abs((y2 - y1) ** 2)) ** 0.5\n if r1 + r2 > distance and abs(r1 - r2) <= distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":20872,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-15 21:28:34","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (abs((x2 - x1) ** 2) + abs((y2 - y1) ** 2)) ** 0.5\n if r1 + r2 > distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":7286,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-15 21:28:34","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (abs((x2 - x1) ** 2) + abs((y2 - y1) ** 2)) ** 0.5\n if r1 + r2 > distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":40787,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-15 21:49:02","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":10484,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-15 21:49:02","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":30730,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-15 21:49:02","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":27024,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-15 23:22:16","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":42149,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-15 23:22:16","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":27485,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-15 23:22:16","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":28048,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-16 01:09:55","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n if x1 == x2 and y1 == y2 and r1 == r2:\n return True\n distance = (x2 - x1 + (y2 - y1)) ** 0.5\n if abs(distance) < r1 or abs(distance) < r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":27549,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-16 01:27:46","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n A = True\n if x1 == x2 and y1 == y2 and r1 == r2:\n return A\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if abs(distance) <= r1:\n return A\n if abs(distance) <= r2:\n return A\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":15954,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-16 01:27:46","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n A = True\n if x1 == x2 and y1 == y2 and r1 == r2:\n return A\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if abs(distance) <= r1:\n return A\n if abs(distance) <= r2:\n return A\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":27268,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-16 01:27:46","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n A = True\n if x1 == x2 and y1 == y2 and r1 == r2:\n return A\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if abs(distance) <= r1:\n return A\n if abs(distance) <= r2:\n return A\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":24628,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-16 10:05:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n item1 = (x2 - x1) ** 2\n item2 = (y2 - y1) ** 2\n item3 = item1 + item2\n distance = item3 ** (1 \/ 2)\n radiusd = r1 + r2\n if distance < radiusd:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":12101,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-16 10:05:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n item1 = (x2 - x1) ** 2\n item2 = (y2 - y1) ** 2\n item3 = item1 + item2\n distance = item3 ** (1 \/ 2)\n radiusd = r1 + r2\n if distance < radiusd:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":27039,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-16 10:05:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n item1 = (x2 - x1) ** 2\n item2 = (y2 - y1) ** 2\n item3 = item1 + item2\n distance = item3 ** (1 \/ 2)\n radiusd = r1 + r2\n if distance < radiusd:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":38336,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-16 10:52:09","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23233,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-16 10:52:09","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":22246,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-16 11:03:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (r1 + r2) ** 2 >= (x1 - x2) ** 2 + (y1 - y2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":12655,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-16 11:36:21","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (r1 + r2) ** 2 >= (x1 - x2) ** 2 + (y1 - y2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":10787,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-16 11:37:59","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (r1 + r2) ** 2 > (x1 - x2) ** 2 + (y1 - y2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":15693,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-16 11:37:59","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (r1 + r2) ** 2 > (x1 - x2) ** 2 + (y1 - y2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":39931,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-16 12:59:47","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31037,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-16 12:59:47","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":17508,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:21:11","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18546,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:21:11","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":32141,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:27:58","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n hypotenuse = ((x2 - x1) ** 2 + (y2 - x1) ** 2) ** 0.5\n if hypotenuse > r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":30699,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:29:25","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n hypotenuse = ((x2 - x1) ** 2 + (y2 - x1) ** 2) ** 0.5\n if hypotenuse >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":22768,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:29:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n hypotenuse = ((x2 - x1) ** 2 + (y2 - x1) ** 2) ** 0.5\n if hypotenuse > r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":9216,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:34:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n hypotenuse = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if hypotenuse > r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":5350,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:36:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n hypotenuse = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if hypotenuse >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":36354,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:36:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n hypotenuse = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if hypotenuse >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":8075,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:41:12","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31102,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:43:57","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":42187,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:45:10","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":16697,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:48:31","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40650,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:48:43","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":32224,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:49:05","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":28439,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:49:22","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25803,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:50:30","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13635,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:51:07","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":31106,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:51:26","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":25754,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:52:55","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":4828,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:53:20","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":9896,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:56:04","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":17452,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:56:23","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":16324,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:58:20","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":5322,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:00:58","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":27476,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-16 15:03:38","func_code":"def distance(x1, y1, x2, y2):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return distance(x1, y1, x2, y2) < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":16263,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-16 15:03:38","func_code":"def distance(x1, y1, x2, y2):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return distance(x1, y1, x2, y2) < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":36057,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-16 15:03:38","func_code":"def distance(x1, y1, x2, y2):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return distance(x1, y1, x2, y2) < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":13241,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:03:47","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":37988,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:04:08","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":6284,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:04:20","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":408,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:05:01","func_code":"def append2list(l1, l2):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":2016,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:05:36","func_code":"def append2list(l1):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":9806,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:05:57","func_code":"def append2list(l1):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":16795,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:06:26","func_code":"def append2list(l1):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":27425,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:08:13","func_code":"def append2list(l1, l2):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":25260,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:08:24","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":25257,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:08:49","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40136,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:09:16","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18232,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:10:35","func_code":"def append2list(l1, l2='none'):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":516,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-16 15:11:06","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n sumradi = r1 + r2\n return distance < sumradi","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":11230,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-16 15:11:06","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n sumradi = r1 + r2\n return distance < sumradi","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":3677,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-16 15:11:06","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n sumradi = r1 + r2\n return distance < sumradi","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":22947,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:12:03","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n return l1\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":14358,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:12:03","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n return l1\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13966,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:31:57","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n if r1 + r2 >= ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":12094,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:32:27","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n if r1 + r2 >= ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":11249,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:35:42","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n x1 = 0\n y1 = 0\n r1 = 1\n x2 = 0\n y2 = 0\n r2 = 1\n if r1 + r2 >= ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":39795,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:38:38","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n x1 = 0\n y1 = 0\n r1 = 1\n x2 = 0\n y2 = 0\n r2 = 1\n if r1 + r2 >= ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":10696,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:45:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if r1 + r2 > ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":29112,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:45:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if r1 + r2 > ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":28316,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:45:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if r1 + r2 > ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":32734,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-16 16:22:49","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n if dist - r1 - r2 < 0:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":4351,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-16 16:24:11","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n if dist - r1 - r2 < 0:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":21168,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-16 16:24:11","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n if dist - r1 - r2 < 0:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":40716,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-16 16:30:31","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":8633,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-16 16:30:31","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":38049,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-16 16:32:20","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r2 + r1","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":15750,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-16 16:32:20","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r2 + r1","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":31849,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-16 17:50:55","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":38110,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-16 17:50:55","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":42242,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-16 18:46:47","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":20462,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-16 18:46:47","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":12350,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-16 18:46:47","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":30998,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-16 23:06:20","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = 0.5 ** ((x1 - x2) ** 2 + (y1 - y2) ** 2)\n return distance < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":35117,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-16 23:10:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":26888,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-16 23:10:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":38697,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-16 23:10:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":19155,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-17 11:24:49","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":42091,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-17 11:24:49","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25774,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-17 11:25:53","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":18077,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-17 11:25:53","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":3581,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 11:38:46","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return abs(r1 - r2) <= math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) <= abs(\n r1 + r2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":40347,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 11:41:39","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return r2 >= math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) + r1","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":42473,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 11:48:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n return abs(r1 - r2) <= dist <= abs(r1 + r2) and (r1 > dist + r2 or r2 >\n dist + r1)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":20442,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 11:49:18","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n inside = r1 > dist + r2 or r2 > dist + r1\n return abs(r1 - r2) <= dist <= abs(r1 + r2) and inside != True","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":32400,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 11:50:01","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n return abs(r1 - r2) <= dist <= abs(r1 + r2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":34413,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 11:58:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n return abs(r1 - r2) < dist < abs(r1 + r2)","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":2408,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 12:00:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n return abs(r1 - r2) < dist < abs(r1 + r2\n ) or x1 == x2 and y1 == y2 and r1 == r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":4874,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 12:03:21","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n internal = r1 + r2\n external = abs(r1 - r2)\n return internal == dist or external == dist","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":19795,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 12:11:38","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":26810,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 12:14:03","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n return l1\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40133,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 12:14:03","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n return l1\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":39918,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-17 13:26:32","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":37296,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-17 13:26:32","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":23871,"user":"3a14771a-b55c-44f8-97ab-0376389e494c","date":"2017-03-17 14:53:57","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = abs(x2 - x1)\n o = abs(y2 - y1)\n h2 = a ** 2 + o ** 2\n h = h2 ** 0.5\n return h <= r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":29556,"user":"3a14771a-b55c-44f8-97ab-0376389e494c","date":"2017-03-17 14:55:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = abs(x2 - x1)\n o = abs(y2 - y1)\n h2 = a ** 2 + o ** 2\n h = h2 ** 0.5\n return h < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":37180,"user":"3a14771a-b55c-44f8-97ab-0376389e494c","date":"2017-03-17 14:55:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = abs(x2 - x1)\n o = abs(y2 - y1)\n h2 = a ** 2 + o ** 2\n h = h2 ** 0.5\n return h < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":37869,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-17 15:51:01","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":11658,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-17 15:51:01","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":28647,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-17 15:52:02","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":14796,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-17 15:52:02","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31549,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 16:46:38","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n internal = r1 + r2\n external = abs(r1 - r2)\n return internal == dist or external == dist","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":13455,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 16:47:52","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n internal = r1 + r2\n external = r1 - r2\n return internal == dist or external == dist","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":39230,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 16:51:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n radii = r1 + r2\n return radii > dist","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":26779,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 16:51:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n radii = r1 + r2\n return radii > dist","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":29282,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-17 17:52:30","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":16018,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-17 17:52:30","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":13697,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 22:26:04","func_code":"def distance(x1, y1, x2, y2):\n disx = (x2 - x1) ** 2\n disy = (y2 - y1) ** 2\n dist = disx + disy\n return math.sqrt(dist)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if distance(x1, y1, x2, y2) < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":10941,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 22:26:04","func_code":"def distance(x1, y1, x2, y2):\n disx = (x2 - x1) ** 2\n disy = (y2 - y1) ** 2\n dist = disx + disy\n return math.sqrt(dist)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if distance(x1, y1, x2, y2) < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":7108,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-17 22:35:14","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":9147,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-17 22:35:14","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":14878,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-17 22:45:24","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":27465,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-17 22:45:24","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":30191,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-17 22:46:24","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":8052,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-17 22:46:24","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":5279,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-17 22:46:36","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n A = True\n if x1 == x2 and y1 == y2 and r1 == r2:\n return A\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if abs(distance) <= r1:\n return A\n if abs(distance) <= r2:\n return A\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":19391,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-17 22:46:36","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n A = True\n if x1 == x2 and y1 == y2 and r1 == r2:\n return A\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if abs(distance) <= r1:\n return A\n if abs(distance) <= r2:\n return A\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":4092,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-17 23:07:40","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18949,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-17 23:07:40","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":9942,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-17 23:07:40","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":19846,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-17 23:07:40","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":7106,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 23:12:17","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":21751,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 23:12:43","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":740,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 23:21:35","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n if len(l2) < 2:\n return l2\n else:\n l2.remove(l2[0])\n l2.remove(l2[0])\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":33227,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 23:21:35","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n if len(l2) < 2:\n return l2\n else:\n l2.remove(l2[0])\n l2.remove(l2[0])\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":15203,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 23:21:35","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n if len(l2) < 2:\n return l2\n else:\n l2.remove(l2[0])\n l2.remove(l2[0])\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":16355,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-17 23:35:02","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":29814,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-17 23:35:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance < radii","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":30007,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-17 23:35:02","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31126,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-17 23:35:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance < radii","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":10587,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-17 23:35:02","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":7483,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-17 23:46:27","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":35565,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-17 23:48:04","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13508,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-17 23:48:04","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":20816,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-17 23:49:20","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rad = (r1 + r2) ** 2\n xs = (x1 - x2) ** 2\n ys = (y1 - y2) ** 2\n both_x_y = xs + ys\n if rad > both_x_y:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":6548,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-17 23:49:20","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rad = (r1 + r2) ** 2\n xs = (x1 - x2) ** 2\n ys = (y1 - y2) ** 2\n both_x_y = xs + ys\n if rad > both_x_y:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":5172,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:15:26","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"funcs08.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":true} -{"submission_id":9263,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:15:26","func_code":"def search(str, sub):\n i = 0\n while i < len(str):\n if sub == str[i]:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"funcs08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==-1 and search('0','0')==0 and search('ERFE0Rfsef','0')==4 and search('ERFERfsef0','0')==9 and search('','a')==-1 and search('cbzeycuzbvyzuvb','a')==-1 and search('cbsducsvdbcyts','c')==0 and search('dbzeducvbzy','y')==10 and search('xqvsgxcutvy','u')==7","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":19621,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:15:26","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs08.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":25402,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:15:26","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"funcs08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":9477,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def search(str, sub):\n i = 0\n while i < len(str):\n if sub == str[i]:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"funcs08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==-1 and search('0','0')==0 and search('ERFE0Rfsef','0')==4 and search('ERFERfsef0','0')==9 and search('','a')==-1 and search('cbzeycuzbvyzuvb','a')==-1 and search('cbsducsvdbcyts','c')==0 and search('dbzeducvbzy','y')==10 and search('xqvsgxcutvy','u')==7","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":3813,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"funcs08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":15050,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def search(str, sub):\n i = 0\n while i < len(str):\n if sub == str[i]:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"funcs08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==-1 and search('0','0')==0 and search('ERFE0Rfsef','0')==4 and search('ERFERfsef0','0')==9 and search('','a')==-1 and search('cbzeycuzbvyzuvb','a')==-1 and search('cbsducsvdbcyts','c')==0 and search('dbzeducvbzy','y')==10 and search('xqvsgxcutvy','u')==7","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22441,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"funcs08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":40370,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs08.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":27780,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def search(str, sub):\n i = 0\n while i < len(str):\n if sub == str[i]:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"funcs08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==-1 and search('0','0')==0 and search('ERFE0Rfsef','0')==4 and search('ERFERfsef0','0')==9 and search('','a')==-1 and search('cbzeycuzbvyzuvb','a')==-1 and search('cbsducsvdbcyts','c')==0 and search('dbzeducvbzy','y')==10 and search('xqvsgxcutvy','u')==7","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":30823,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"funcs08.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":true} -{"submission_id":26095,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"funcs08.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":true} -{"submission_id":29879,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs08.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":3735,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"funcs08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":7928,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"funcs08.py_ca278_merge_lists","academic_year":2016,"module":"ca278","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","description":"Obtain every second element of l1 and l2.","correct":true} -{"submission_id":1498,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"funcs08.py_ca278_remove_zeros","academic_year":2016,"module":"ca278","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([1, 2, 3, 4, -12, -2])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([0, 0, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None and remove_zeros([1, 0, 3, 2, 1, 9, 0, 0, 0])==None","description":"Remove zeros from list.","correct":true} -{"submission_id":37457,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:01:16","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":37876,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:01:16","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":37000,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:01:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":34334,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:06:00","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":14377,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:06:00","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":15685,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:06:00","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":16156,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:08:04","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":15769,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:08:04","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":25995,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:08:04","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":28999,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:24:37","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":13229,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:24:37","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":24673,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:24:37","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":7972,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:25:21","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":21922,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:25:21","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":42292,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:25:21","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":39668,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":10080,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":34755,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n if n == 1:\n return 1\n else:\n fibN_2 = 0\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":30075,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n if n == 1:\n return 1\n else:\n fibN_2 = 0\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":12762,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":13111,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":35583,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":41631,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":24877,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":17387,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":39739,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":17159,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":14010,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":5613,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22291,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":37372,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:29:37","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":23593,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:29:37","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = [0]\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":34475,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:29:37","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":35706,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:01","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":21222,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:01","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":1571,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:01","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = [0]\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":9814,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:41","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = [0]\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":23046,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:41","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":9226,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:41","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":40156,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:33:26","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":2042,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:33:26","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = []\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":235,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:33:26","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":11558,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:34:58","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":28484,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:34:58","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34227,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:34:58","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = []\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":9382,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":39555,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":12766,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":31136,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = []\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":8670,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":11716,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = []\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":33897,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = []\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":32092,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":17304,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":39429,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:00:38","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22953,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:01:56","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":10088,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:02:24","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":38802,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:02:24","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":33444,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:03:34","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":33454,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:04:42","func_code":"def search(string, letter):\n i = 0\n if letter in string:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":27737,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:05:25","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":21826,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:06:01","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":16664,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:06:27","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)\n return str, letter","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":35203,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:06:27","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')\n return str, letter","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":1557,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:07:17","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')\n return","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":31036,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:07:17","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)\n return","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":17094,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:07:31","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15943,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:08:00","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":25451,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:08:00","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":33343,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:08:02","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":24650,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:08:30","func_code":"def search(string, letter):\n if letter in string:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":31310,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:08:30","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":39010,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:09:03","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":20818,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:09:56","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":13329,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:09:56","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":39141,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:10:39","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":2259,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:10:39","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":11539,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:11:30","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":16385,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:11:30","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":18670,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:11:58","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":7136,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:11:58","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":1980,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:11:58","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":2327,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:12:48","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return true\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":7102,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:12:48","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":36204,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:13:03","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":23097,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:13:03","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":39083,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:13:22","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return False\n else:\n return True","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":6387,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:14:14","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return False\n return True","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":39335,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:14:37","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":15162,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:15:42","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":41618,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:16:19","func_code":"def search(str, letter):\n if letter in str:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":24718,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:16:19","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n letter = letter[0]","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":30079,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:16:44","func_code":"def search(string, letter):\n if letter in string:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":685,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:17:28","func_code":"def index(str, letter):\n for item in str:\n if item == letter:\n return item\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":35693,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:17:28","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":5685,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:17:29","func_code":"def search(str, letter):\n if letter in str:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":31190,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:17:29","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)\n\n\ndef search(str, letter):\n if letter in str:\n print('True')\n else:\n print('False')\n\n\ndef index(str, letter):\n i = 0\n if letter in str:\n letter = letter[0]","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":27712,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:17:30","func_code":"def search(string, letter):\n if letter in string:\n print('True')\n else:\n print('False')\n return string","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":39976,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:19:27","func_code":"def search(string, letter):\n if letter in string:\n print('True')\n else:\n print('False')\n return 1","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":12090,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:21:49","func_code":"def search(string, letter):\n if letter in string:\n print('True')\n else:\n print('False')\n return letter","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":29855,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:23:54","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":39685,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:23:54","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return False","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":18535,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:24:09","func_code":"def search(string, letter):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":29489,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:24:20","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":27099,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:24:20","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":11572,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:27:35","func_code":"def search(str, letter):\n list(map(split, str))\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":24356,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:28:37","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":18149,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":33544,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":31783,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":9315,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":20212,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":1971,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":32214,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":4077,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":38091,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":8528,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:30:47","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":10071,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:30:47","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22121,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:30:47","func_code":"def fibonacci(n):\n i = 0\n num = 1\n num1 = 1\n num2 = 1\n while i < n:\n if n == 0:\n return 0\n elif n == 1:\n return 1\n num = num3 + num2\n num2 = num3\n num3 = num\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":16505,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:31:13","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":7630,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:31:13","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":14749,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:31:13","func_code":"def fibonacci(n):\n i = 0\n num = 1\n num1 = 1\n num2 = 1\n while i < n:\n if n == 0:\n return 0\n elif n == 1:\n return 1\n num = num2 + num1\n num1 = num2\n num2 = num\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":36868,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:32:21","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":10990,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:32:21","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":39652,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:32:21","func_code":"def fibonacci(n):\n i = 0\n num = 1\n num1 = 1\n num2 = 1\n if n == 0:\n return 0\n elif n == 1:\n return 1\n while i < n:\n num = num2 + num1\n num1 = num2\n num2 = num\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":28488,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:32:58","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":37364,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:32:58","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i < n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":21563,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:32:58","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":29485,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:33:02","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":16084,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":33651,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":30926,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":30731,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":3951,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":7161,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":32731,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:33:28","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":10873,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:33:28","func_code":"def fibonacci(n):\n i = 0\n num = 1\n num1 = 1\n num2 = 1\n if n == 0:\n return 0\n elif n == 1:\n return 1\n while i < n:\n num = num2 + num1\n num1 = num2\n num2 = num\n print(num)\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":15561,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:33:28","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":30552,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:33:40","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":7654,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:33:40","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":10529,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:33:40","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":17026,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:33","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":24250,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:33","func_code":"def fibonacci(n):\n i = 2\n num = 1\n num1 = 1\n num2 = 1\n if n == 0:\n return 0\n elif n == 1:\n return 1\n while i < n:\n num = num2 + num1\n num1 = num2\n num2 = num\n print(num)\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":23919,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:33","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":3963,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":30410,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":34344,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":15928,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def fibonacci(n):\n i = 2\n num = 1\n num1 = 1\n num2 = 1\n if n == 0:\n return 0\n elif n == 1:\n return 1\n while i < n:\n num = num2 + num1\n num1 = num2\n num2 = num\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":41791,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34800,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def fibonacci(n):\n i = 2\n num = 1\n num1 = 1\n num2 = 1\n if n == 0:\n return 0\n elif n == 1:\n return 1\n while i < n:\n num = num2 + num1\n num1 = num2\n num2 = num\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":5362,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:35:54","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":11839,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:38:32","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":33396,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-03-22 13:39:24","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":20870,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-03-22 13:39:24","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":41424,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:40:04","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n elif letter != string[-1]:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":28087,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:40:41","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":36515,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:41:25","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":1397,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:42:13","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":28595,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:17","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":20827,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:17","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":1922,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:17","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":28593,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:42:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34058,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:42:32","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":2857,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:46","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":12889,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:46","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":34419,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:46","func_code":"def search(str, letter, pos):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":376,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":32283,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15732,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":25477,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":7180,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":12029,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":40464,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":38370,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":36883,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":24527,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:43:24","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":18826,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:43:24","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":21291,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:43:41","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22902,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:43:41","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":16328,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:43:55","func_code":"def search(string, letter):\n i = 0\n if string[i] == letter:\n return True\n elif i < len(string):\n search(string[i + 1], letter)\n else:\n return False\n i = i + 1","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":3552,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:44:20","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return len[:i]\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":21321,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:44:20","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":10022,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:44:54","func_code":"def search(string, letter):\n i = 0\n if string[i] == letter:\n return True\n elif i < len(string):\n i = i + 1\n search(string[i + 1], letter)\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":29213,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:46:00","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":13295,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:46:00","func_code":"def index(str, letter):\n for item in ls:\n return str - 1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":7498,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:47:28","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i += 1\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":30649,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:47:47","func_code":"def index(str, letter):\n for item in ls:\n return str - 1\n return index","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":15582,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:47:47","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":8521,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:48:38","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34129,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:48:38","func_code":"def index(str, letter):\n for item in str:\n return str - 1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":833,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":40127,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":9472,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15019,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":19015,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":26870,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":23745,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":12678,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":5955,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":2634,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:49:37","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":38885,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:49:37","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":24121,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:49:58","func_code":"def search(string, letter):\n i = 0\n if string[i] == letter:\n return True\n else:\n search(string[i + 1], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":25026,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":30740,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34282,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":9652,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":13413,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":14331,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":25680,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:09","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":38925,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:09","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":38669,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":30917,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":32924,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":39259,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":37172,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":24327,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":3237,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:51:30","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":17940,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:51:30","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":17903,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:51:45","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return index","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":38832,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:51:45","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22991,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":31666,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":26501,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":39631,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":24584,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":12679,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34911,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:52:47","func_code":"def fibonacci(n):\n n = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":6068,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:52:47","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":13082,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:52:47","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":23471,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:52:53","func_code":"def search(string, letter):\n i = 0\n if string[i] == letter:\n return True\n else:\n i = i + 1\n search(string[i], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":38798,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":20078,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":19463,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":40679,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":36781,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":15011,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":28083,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":38920,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":30245,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":11313,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:53:26","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":21029,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:53:26","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i += 1\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":28801,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":23979,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":20828,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":28246,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":39609,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":31306,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":39938,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":29333,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":39887,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":19179,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:58:22","func_code":"def search(string, letter, count):\n i = 0\n if string[i] == letter:\n return True\n else:\n count = i + 1\n search(string[count], letter, count)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":22122,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:59:30","func_code":"def search(string, letter):\n i = 0\n if string[i] == letter:\n return True\n else:\n count = i + 1\n search(string[count], letter, count)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":42174,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:02:13","func_code":"def search(string, *letter):\n i = 0\n if string[i] == letter[0]:\n return True\n else:\n count = i + 1\n search(string[count], letter[0])","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":28621,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:03:19","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":40837,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:04:39","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":37758,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:04:39","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":17180,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:05:55","func_code":"def search(string, letter):\n if not i:\n i = 0\n if string[i] == letter:\n return True\n else:\n search(string[i + 1], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":11268,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:06:05","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":15627,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:06:05","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":23077,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:07:41","func_code":"def search(string, letter):\n if i not in search():\n i = 0\n if string[i] == letter:\n return True\n else:\n search(string[i + 1], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":34560,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:09:35","func_code":"def search(string, letter):\n if 'i' not in locals():\n i = 0\n if string[i] == letter:\n return True\n else:\n search(string[i + 1], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":23520,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:10:23","func_code":"def search(string, letter):\n if 'i' not in locals():\n i = 0\n if string[i] == letter:\n return True\n elif i < len(string):\n search(string[i + 1], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":17316,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:11:01","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":16150,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:11:01","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":31170,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:11:23","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34979,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:11:23","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":24062,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:11:57","func_code":"def search(string, letter):\n if 'i' not in locals():\n i = 0\n if string[i] == letter:\n return True\n elif i < len(string):\n search(string[i + 1], letter)\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":5490,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:13:38","func_code":"def fibonacci(n):\n i = 0\n while i < len(n):\n if n + 1 == n + 2:\n return i\n i += 1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":42030,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:13:38","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":296,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:13:38","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":34913,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:15:02","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":4603,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:15:02","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":36622,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:15:02","func_code":"def fibonacci(n):\n i = 0\n while i < len(n - 1):\n if n + 1 == n + 2:\n return i\n i += 1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":19915,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:29:34","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":36346,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:29:34","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":14017,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:35:09","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":16589,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:35:09","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":40267,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:35:09","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n print(c)\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":35876,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:01","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":26198,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:01","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":28692,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:01","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":11548,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:51","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":6391,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:51","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":10581,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:51","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n print(n)\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":39953,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:37:04","func_code":"def search(string, letter):\n if string[0] == letter:\n return True\n test = 1\n else:\n search(string[1:], letter)\n if test != 1:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":10321,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:37:39","func_code":"def search(string, letter):\n if string[0] == letter:\n return True\n test = 1\n else:\n search(string[1:], letter)\n if test != 1:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":40921,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:37:41","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":29617,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:37:41","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":4448,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:37:41","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n print(n)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":23038,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:38:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":7432,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:38:06","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":7696,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:38:06","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n print(c)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":12275,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:38:47","func_code":"def search(string, letter):\n test = 0\n if string[0] == letter:\n test = 1\n else:\n search(string[1:], letter)\n if test == 0:\n return False\n else:\n return True","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":36073,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:14","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n return c\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":36632,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:14","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":7773,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:14","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":18160,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:31","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":33953,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:31","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":14378,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:31","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":42112,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:01","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":12113,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:01","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":41026,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:01","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n return a\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":7135,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:44","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":9734,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:44","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":12243,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:44","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n[i]\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":4018,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:58","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":17568,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:58","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":31530,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:58","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":9301,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:29","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":31730,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:29","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":1109,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:29","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return len(n)\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":33576,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:41","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":42248,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:41","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":33062,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:41","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":1726,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:42:43","func_code":"def search(string, letter):\n if string == []:\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":22294,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:10","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":23251,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:10","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":8025,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:10","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return b\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":6631,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":23441,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:33","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":3153,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:33","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":3698,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:43:44","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":1311,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:45:10","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":31663,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:45:10","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":7168,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:45:10","func_code":"def fibonacci(n):\n count = 0\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return count\n a = b\n b = c\n count += 1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":33617,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:47:16","func_code":"def search(string, letter, pos):\n if pos == len(string):\n return False\n elif string[pos] == letter:\n return True\n else:\n search(string, letter, pos + 1)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":17319,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:01","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":21814,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:01","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":24079,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:01","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":11890,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:23","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22422,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:23","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n + 2\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":32035,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:23","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":36595,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":39997,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i += 1\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":534,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":20215,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":6060,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i += 1\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":18674,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":25896,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:49:22","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":16957,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":6458,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":22004,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":23014,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":30808,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":39709,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":42100,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":19413,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":35747,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":3214,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:58:07","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":21587,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:58:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n ans = fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":42094,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:58:39","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":7874,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:58:39","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":31929,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:58:45","func_code":"def search(str, letter):\n for char in str:\n if char == letter:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":2145,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:58:45","func_code":"def fibonacci(n):\n old = 1\n cur = 1\n i = 1\n while i < n:\n cur, old, i = cur + old, cur, i + 1\n return cur","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":11976,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:58:45","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":37546,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:59:28","func_code":"def search(str, letter):\n for char in str:\n if char == letter:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":31809,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:59:28","func_code":"def fibonacci(n):\n old = 1\n cur = 1\n i = 1\n while i < n:\n cur, old, i = cur + old, cur, i + 1\n return cur","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":18856,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:59:28","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":2114,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:01:38","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":13997,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:01:38","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":8468,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:01:38","func_code":"def index(string, letter, pos):\n if pos == len(string):\n return -1\n elif string[pos] == letter:\n return pos\n else:\n return index(string, letter, pos)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":37384,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:02:47","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":25341,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:02:47","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":23394,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:02:47","func_code":"def index(string, letter, pos):\n if pos == len(string):\n return -1\n elif string[pos] == letter:\n return pos\n else:\n index(string, letter, pos)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":4695,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:03:32","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":8808,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:03:32","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":2807,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:03:32","func_code":"def index(string, letter, pos):\n if pos == len(string):\n return -1\n elif string[pos] == letter:\n return pos\n else:\n index(string, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":26679,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:07:47","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":11560,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:07:47","func_code":"def index(string, letter, count):\n if count == len(string) - 1:\n return -1\n elif string[count] == letter:\n return count\n else:\n index(string, letter, count + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":12477,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:07:47","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":7422,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:07:58","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":13725,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:10:16","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":15371,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:10:16","func_code":"def index(string, letter, count):\n print(count)\n if count == len(string) - 1:\n return -1\n elif string[count] == letter:\n return count\n else:\n index(string, letter, count + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":19816,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:10:16","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":10855,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:11:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":23380,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:11:33","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":19180,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:11:42","func_code":"def index(string, letter, count):\n print(count)\n k = len(string)\n if count == k:\n return -1\n elif string[count] == letter:\n return count\n else:\n index(string, letter, count + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":11186,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:11:42","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":30716,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:11:42","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":31332,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:11:51","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":19577,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:11:51","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":17084,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:16","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":36072,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:16","func_code":"def index(string, letter, count):\n print(count)\n k = len(string)\n if count == k:\n print(-1)\n elif string[count] == letter:\n print(count)\n else:\n index(string, letter, count + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":33875,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:16","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":10739,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:29","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":1394,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:29","func_code":"def index(string, letter, count):\n k = len(string)\n if count == k:\n print(-1)\n elif string[count] == letter:\n print(count)\n else:\n index(string, letter, count + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":2942,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:29","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":2422,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":13240,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":25162,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":27158,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":37111,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":16524,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":19932,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":40672,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":13528,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":30595,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:05","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":6539,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:05","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":31642,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:05","func_code":"def index(string, letter, count):\n print(count)\n k = len(string)\n if count == k:\n return -1\n elif string[count] == letter:\n return count\n else:\n return index(string, letter, count + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":38764,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:18","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":33913,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:18","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":38586,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:18","func_code":"def index(string, letter, count):\n k = len(string)\n if count == k:\n return -1\n elif string[count] == letter:\n return count\n else:\n return index(string, letter, count + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":6716,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":41068,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def index(string, letter, count):\n k = len(string)\n if count == k:\n return -1\n elif string[count] == letter:\n return count\n else:\n return index(string, letter, count + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":20756,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":29248,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def index(string, letter, count):\n k = len(string)\n if count == k:\n return -1\n elif string[count] == letter:\n return count\n else:\n return index(string, letter, count + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":12092,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":40103,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def index(string, letter, count):\n k = len(string)\n if count == k:\n return -1\n elif string[count] == letter:\n return count\n else:\n return index(string, letter, count + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":22501,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":9161,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":35446,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":15723,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:37:12","func_code":"def search(str, letter):\n for char in str:\n if char == letter:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":9634,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:37:12","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":6721,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:37:12","func_code":"def fibonacci(n):\n old = 1\n cur = 1\n i = 1\n while i < n:\n cur, old, i = cur + old, cur, i + 1\n return cur","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":11269,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 15:44:05","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":38239,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:54:36","func_code":"def search(str, letter):\n for c in str:\n if c == letter:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":30342,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:54:36","func_code":"def fibonacci(n):\n i = 0\n while n > i:\n n","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":20939,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:54:36","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":17673,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def fibonacci(n):\n if n == 0:\n return n\n elif n == 1:\n return n\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":32173,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def fibonacci(n):\n if n == 0:\n return n\n elif n == 1:\n return n\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":6801,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":5732,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":5746,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def fibonacci(n):\n if n == 0:\n return n\n elif n == 1:\n return n\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":965,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":28725,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":1239,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":25776,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15329,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 15:57:45","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":18880,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 15:57:45","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":29037,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:59:55","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":37048,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:59:55","func_code":"def search(str, letter):\n for c in str:\n if c == letter:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":495,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:00:43","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":30639,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:00:43","func_code":"def search(str, letter):\n for c in str:\n if letter == c:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":5082,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:02:08","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":32252,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:02:08","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":41686,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":14183,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":36658,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":8573,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":5666,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":36904,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":30117,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":37190,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":5984,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":6208,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":13090,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":28329,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":9092,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":1054,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":11156,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":41473,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:29:08","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":33089,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:47:00","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":8416,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:47:00","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":35084,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:47:00","func_code":"def index(str, letter):\n a = len(str) - 1\n b = -1\n if letter == str[a]:\n return start\n else:\n a -= 1\n index(str, letter)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":24404,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:50:53","func_code":"def index(str, letter, pos):\n if letter == str[pos]:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":1129,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:50:53","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":28266,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:50:53","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":25890,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":5760,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def index(str, letter, pos):\n pos = 0\n if letter == str[pos]:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":4479,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":8272,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":26281,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":32722,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def index(str, letter, pos):\n pos = 0\n if letter == str[pos]:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":35671,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":4147,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":16911,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def index(str, letter, pos):\n pos = 0\n if letter == str[pos]:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":30973,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:21:48","func_code":"def fibonacci(n):\n fib = [0, 1]\n i = 2\n while i < n + 1:\n tmp = int(fib[i - 2]) + int(fib[i - 1])\n fib.append(tmp)\n i += 1\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":10804,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:21:48","func_code":"def search(string, letter):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":14710,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:21:48","func_code":"def index(string, letter):\n if letter in string:\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":32735,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def search(string, letter):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":808,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def index(string, letter):\n if letter in string:\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":36203,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def index(string, letter):\n if letter in string:\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":40752,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def fibonacci(n):\n fib = [0, 1]\n i = 2\n while i < n + 1:\n tmp = int(fib[i - 2]) + int(fib[i - 1])\n fib.append(tmp)\n i += 1\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":21025,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def search(string, letter):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":11182,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def fibonacci(n):\n fib = [0, 1]\n i = 2\n while i < n + 1:\n tmp = int(fib[i - 2]) + int(fib[i - 1])\n fib.append(tmp)\n i += 1\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":32114,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def fibonacci(n):\n fib = [0, 1]\n i = 2\n while i < n + 1:\n tmp = int(fib[i - 2]) + int(fib[i - 1])\n fib.append(tmp)\n i += 1\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":17675,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def search(string, letter):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":24280,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def index(string, letter):\n if letter in string:\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":30200,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-23 15:48:35","func_code":"def swap_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":37212,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-23 15:48:35","func_code":"def swap_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":13009,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-23 15:50:50","func_code":"def swap_unique_keys_values(d):\n seen = {}\n result = {}\n for k, v in list(d.items()):\n if v in seen:\n del seen[v]\n else:\n seen[v] = k\n result[v] = k\n return seen","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":19219,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-23 15:50:50","func_code":"def swap_unique_keys_values(d):\n seen = {}\n result = {}\n for k, v in list(d.items()):\n if v in seen:\n del seen[v]\n else:\n seen[v] = k\n result[v] = k\n return seen","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":26276,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:00:19","func_code":"def search(str, letter):\n if letter in str:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":19306,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:01:55","func_code":"def search(str, letter):\n if letter in str:\n print('True')\n elif letter not in str:\n print('False')","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":8133,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:07:34","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n break\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":15930,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:08:04","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":38012,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:08:35","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n break\n print('True')\n else:\n print('False')\n i += 1","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":28579,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:09:29","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n print('True')\n else:\n print('False')\n i += 1","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":41624,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:10:30","func_code":"def search(str, letter):\n if letter in str:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":34002,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:11:04","func_code":"def search(str, letter):\n if letter in str:\n print('True'.rstrip())\n else:\n print('False'.rstrip())","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":22433,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:12:20","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":1468,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:15:28","func_code":"def index(str, letter):\n return str.index(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":38168,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:15:28","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":978,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:18:16","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":7683,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:18:16","func_code":"def index(str, letter):\n return str.find(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":26979,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:23:07","func_code":"def index(str, letter):\n return str.find(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":31447,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:23:07","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":34271,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:23:07","func_code":"def fibonacci(n):\n a = 1\n b = 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":18036,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def fibonacci(n):\n a = 1\n b = 1\n if n != 0:\n for i in range(n - 1):\n a, b = b, a + b\n else:\n return 0\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":33001,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def index(str, letter):\n return str.find(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":1136,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def index(str, letter):\n return str.find(letter)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":14096,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":32840,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def fibonacci(n):\n a = 1\n b = 1\n if n != 0:\n for i in range(n - 1):\n a, b = b, a + b\n else:\n return 0\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":26995,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":20786,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:25:36","func_code":"def index(str, letter):\n return str.find(letter)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":38548,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:25:36","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":24829,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:25:36","func_code":"def fibonacci(n):\n a = 1\n b = 1\n if n != 0:\n for i in range(n - 1):\n a, b = b, a + b\n else:\n return 0\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":23614,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":37659,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def fibonacci(n):\n a = 1\n b = 1\n if n != 0:\n for i in range(n - 1):\n a, b = b, a + b\n else:\n return 0\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":33871,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def index(str, letter, n):\n return str.find(letter)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":38240,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def index(str, letter, n):\n return str.find(letter)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":1249,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def fibonacci(n):\n a = 1\n b = 1\n if n != 0:\n for i in range(n - 1):\n a, b = b, a + b\n else:\n return 0\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":36124,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":28823,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-24 12:45:45","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":30754,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-24 12:45:45","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":1720,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-24 12:45:45","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":24528,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:21:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n elif n == 2:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":2313,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:21:03","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":8409,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:21:03","func_code":"def index(string, letter, pos=0):\n if string == '':\n return '-1'\n elif string[0] == letter:\n return pos\n else:\n pos += 1\n return index(string[1:], letter, pos=pos)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":35739,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def index(string, letter, pos=0):\n if string == '':\n return '-1'\n elif string[0] == letter:\n return pos\n else:\n pos += 1\n return index(string[1:], letter, pos=pos)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":41906,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n elif n == 2:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":23982,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":33237,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n elif n == 2:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":23672,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":37895,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def index(string, letter, pos=0):\n if string == '':\n return '-1'\n elif string[0] == letter:\n return pos\n else:\n pos += 1\n return index(string[1:], letter, pos=pos)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":24751,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":35208,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def index(string, letter, pos=0):\n if string == '':\n return '-1'\n elif string[0] == letter:\n return pos\n else:\n pos += 1\n return index(string[1:], letter, pos=pos)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":17438,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n elif n == 2:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":42151,"user":"1b62c11e-ae6b-4c7f-8eac-f8a9a0acb450","date":"2017-03-26 20:12:18","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":561,"user":"1b62c11e-ae6b-4c7f-8eac-f8a9a0acb450","date":"2017-03-26 20:16:40","func_code":"def reverse(a):\n i = len(a) - 1\n new_array = []\n while i >= 0:\n new_array.append(a[i])\n i -= 1\n return new_array","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":37674,"user":"1b62c11e-ae6b-4c7f-8eac-f8a9a0acb450","date":"2017-03-26 20:18:49","func_code":"def reverse(a):\n i = len(a) - 1\n new_array = []\n while i >= 0:\n new_array.append(a[i])\n i -= 1\n return new_array","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":35872,"user":"1b62c11e-ae6b-4c7f-8eac-f8a9a0acb450","date":"2017-03-26 20:18:49","func_code":"def reverse(a):\n i = len(a) - 1\n new_array = []\n while i >= 0:\n new_array.append(a[i])\n i -= 1\n return new_array","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":29303,"user":"1b62c11e-ae6b-4c7f-8eac-f8a9a0acb450","date":"2017-03-26 20:18:49","func_code":"def reverse(a):\n i = len(a) - 1\n new_array = []\n while i >= 0:\n new_array.append(a[i])\n i -= 1\n return new_array","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":39556,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:04:42","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":17674,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:04:42","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":32826,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:04:42","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":4083,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:05:00","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":21494,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:05:00","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34632,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:05:00","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":12064,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:06:55","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15599,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:06:55","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":7786,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:06:55","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return c\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":26052,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:08:51","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":3398,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:08:51","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":24414,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:08:51","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return c + 1\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":11744,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:09:09","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22609,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:09:09","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":17802,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:09:09","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":30626,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:19:38","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":18894,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:19:38","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":37971,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:20:28","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":31000,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:20:28","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":14753,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:25:14","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":32593,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:25:14","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":22343,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:25:14","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":18447,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:29:03","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":35252,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:29:03","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":7334,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:29:32","func_code":"def fibonacci(n):\n i = 0\n while i < len(n):\n if n[i] == 0:\n return i\n i += 1\n return c\n c = i + 1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":18973,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:29:32","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":2453,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:29:32","func_code":"def fibonacci(n):\n i = 0\n while i < len(n):\n if n[i] == 0:\n return i\n i += 1\n return c\n c = i + 1\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":3655,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:13","func_code":"def fibonacci(n):\n i = 0\n while i < n:\n if n[i] == 0:\n return i\n i += 1\n return c\n c = i + 1\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":40854,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:13","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":41841,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:13","func_code":"def fibonacci(n):\n i = 0\n while i < n:\n if n[i] == 0:\n return i\n i += 1\n return c\n c = i + 1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":20253,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:34","func_code":"def fibonacci(n):\n i = 0\n c = i + 1\n while i < n:\n if n[i] == 0:\n return i\n i += 1\n return c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":5368,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:34","func_code":"def fibonacci(n):\n i = 0\n c = i + 1\n while i < n:\n if n[i] == 0:\n return i\n i += 1\n return c\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":33146,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:34","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":28846,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:57","func_code":"def fibonacci(n):\n i = 0\n c = i + 1\n while i < n:\n if n == 0:\n return i\n i += 1\n return c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":12614,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:57","func_code":"def fibonacci(n):\n i = 0\n c = i + 1\n while i < n:\n if n == 0:\n return i\n i += 1\n return c\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":4048,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:57","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":16273,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:00","func_code":"def fibonacci(n):\n i = 0\n x = 1\n c = i + x\n while i < n:\n if n == 0:\n return i\n i += 1\n return c\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":26189,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:00","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":2711,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:00","func_code":"def fibonacci(n):\n i = 0\n x = 1\n c = i + x\n while i < n:\n if n == 0:\n return i\n i += 1\n return c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":329,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:25","func_code":"def fibonacci(n):\n i = 0\n x = 1\n c = i + x\n while i < n:\n if n == 0:\n return i\n i += 1\n c += 1\n return c\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":30392,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:25","func_code":"def fibonacci(n):\n i = 0\n x = 1\n c = i + x\n while i < n:\n if n == 0:\n return i\n i += 1\n c += 1\n return c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":20631,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:25","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":3230,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:41","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":2197,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:41","func_code":"def fibonacci(n):\n i = 0\n x = 1\n c = i + x\n while i < n:\n if n == 0:\n return i\n i += 1\n c += 1\n return c\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":17294,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:41","func_code":"def fibonacci(n):\n i = 0\n x = 1\n c = i + x\n while i < n:\n if n == 0:\n return i\n i += 1\n c += 1\n return c","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":32472,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:35:46","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":26235,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:35:46","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":39842,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:35:46","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":26015,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:29","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":35009,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:29","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":39526,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:29","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":5673,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:41","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":26241,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:41","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":8867,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:41","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":15348,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:40:42","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":35701,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:40:42","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":1624,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:40:42","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":27154,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:45:44","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":22929,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:45:44","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34401,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:45:44","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":30720,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:46:10","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":26973,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:46:10","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":17649,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:46:10","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":37182,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":35349,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:06","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":21652,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:06","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":31583,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:31","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":25063,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:31","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":36105,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:31","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":19420,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:45","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15679,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:45","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":17100,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:45","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":42042,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:58","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":18804,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:58","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":11603,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:58","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":10700,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:48:43","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":1570,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:48:43","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":21322,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:48:43","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":161,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:49:29","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":13655,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:49:29","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":11378,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:49:29","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":7715,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":29809,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":20244,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":17032,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":10517,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":27418,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":11103,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:30","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":17401,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:30","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":35308,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:30","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":32832,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:57","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":12968,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:57","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":4250,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:57","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":34260,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:19","func_code":"def fibonacci(n):\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n print(a)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":16643,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:19","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":6307,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:19","func_code":"def index(str, letter):\n if letter in str:\n print(str.index(letter))\n else:\n print(-1)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":7326,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:47","func_code":"def index(str, letter):\n if letter in str:\n print(str.index(letter))\n else:\n print(-1)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":12087,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:47","func_code":"def fibonacci(n):\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n print(a)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":30752,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:47","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":39777,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:59:13","func_code":"def index(s, letter):\n if letter in s:\n print(str.index(letter))\n else:\n print(-1)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":41561,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:59:13","func_code":"def search(s, letter):\n if letter in s:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":41821,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:59:13","func_code":"def fibonacci(n):\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":5414,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 13:00:02","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":26957,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 13:00:02","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":32063,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 13:00:02","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":139,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:00:10","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":14366,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:00:10","func_code":"def index(s, letter):\n if letter in s:\n print(s.index(letter))\n else:\n print(-1)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":14757,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:00:10","func_code":"def search(s, letter):\n if letter in s:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":40751,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:01:16","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":31963,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:01:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n else:\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":33984,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:01:16","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":19515,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:02:23","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":32977,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:02:23","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":36792,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:02:23","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":16982,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:25","func_code":"def search(s, letter):\n print(letter in s)","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":19511,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:25","func_code":"def index(s, letter):\n if letter in s:\n print(s.index(letter))\n else:\n print(-1)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":11544,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:25","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":27673,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:54","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":12334,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:54","func_code":"def index(s, letter):\n if letter in s:\n print(s.index(letter))\n else:\n print(-1)","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":4034,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:54","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":14309,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:08","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":16069,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:08","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":7751,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:08","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":32269,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:23","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":29695,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:23","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":3432,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:23","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":2013,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:45","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":822,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:45","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":4085,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:45","func_code":"def index(s, letter):\n if letter in s:\n return s.index(letter)\n else:\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":15680,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":29401,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":25711,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":32129,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":14182,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def index(s, letter):\n if letter in s:\n return s.index(letter)\n else:\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":3727,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def index(s, letter):\n if letter in s:\n return s.index(letter)\n else:\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":27088,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:07:14","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":24836,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:07:14","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":28728,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:07:14","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":20348,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:12:47","func_code":"def index(s, letter):\n if letter in s:\n return s.index(letter)\n else:\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":22129,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:12:47","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":29813,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:12:47","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":17181,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:17:56","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":11849,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:17:56","func_code":"def index(s, letter, num):\n if num == len(s):\n print(-1)\n return\n if s[num] == letter:\n print(num)\n return\n index(s, letter, num + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":32751,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:17:56","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":28407,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:18:28","func_code":"def index(s, letter, num):\n if num == len(s):\n return -1\n if s[num] == letter:\n return num\n index(s, letter, num + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":23340,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:18:28","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":25839,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:18:28","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":27014,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:19:18","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":25954,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:19:18","func_code":"def index(s, letter, num):\n if num == len(s):\n return -1\n if s[num] == letter:\n return num\n index(s, letter, num + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":35259,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:19:18","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":29867,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":20550,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def index(s, letter, num):\n if num == len(s):\n return -1\n if s[num] == letter:\n return num\n n = index(s, letter, num + 1)\n return n","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":10380,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":24071,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def index(s, letter, num):\n if num == len(s):\n return -1\n if s[num] == letter:\n return num\n n = index(s, letter, num + 1)\n return n","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":2314,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":19133,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":36629,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15027,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def index(s, letter, num):\n if num == len(s):\n return -1\n if s[num] == letter:\n return num\n n = index(s, letter, num + 1)\n return n","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":20945,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":21181,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:21:02","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":37888,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:21:02","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":25166,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:21:02","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":11696,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:10","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":6283,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:10","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":19072,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:10","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":38143,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:43","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":1149,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:43","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":18636,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:43","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":20630,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:27:14","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":24257,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:27:14","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":13441,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:27:14","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":24210,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:28:13","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":5698,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:28:13","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":26703,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:28:55","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":36804,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:28:55","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":22783,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:28:55","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":10004,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:09","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":4741,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:09","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":28067,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:09","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":30673,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:32","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":3554,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:32","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":7576,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:32","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":11416,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:05","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":27595,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:05","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":38922,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:05","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":35740,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":22124,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:33","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":18109,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:33","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":338,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:37:09","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":33976,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:37:09","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":37997,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:37:09","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":33030,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:34","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":8691,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:34","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":2384,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:34","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":12058,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":9469,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":31805,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":7381,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":38670,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":5402,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":35742,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:39:22","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":36411,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:39:22","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":5519,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:39:22","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":3402,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":21454,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":26391,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":16444,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def index(str, letter, num):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":10327,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":35609,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def index(str, letter, num):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":38626,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":30074,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":31321,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def index(str, letter, num):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":13963,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:52:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22183,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:52:32","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":6455,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:52:32","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n - i:\n x = i\n i = i + z\n z = x\n print(i)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":420,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:57:13","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":28448,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:57:13","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":8036,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:57:13","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n - i:\n x = i\n i = i + z\n z = x\n print(i)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":18346,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:58:31","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":2357,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:58:31","func_code":"def fibonacci(n):\n i = 1\n j = 0\n k = 0\n while i < n - i:\n k = i\n i = j + i\n j = k\n print(i)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":13486,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:58:31","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":16251,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:00:10","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n print(i)\n print(z)\n print(x)\n while i < n - i:\n x = i\n i = i + z\n z = x\n print(i)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":22417,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:00:10","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":2244,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:00:10","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":3317,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:01:06","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":36511,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:01:06","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n - i:\n x = i\n i = i + z\n z = x\n print(i)\n print(z)\n print(x)\n print(i)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":17699,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:01:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":34964,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:02:22","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n - i:\n x = i\n i = i + z\n z = x\n print(str(i))","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":37397,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:02:22","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15521,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:02:22","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":1658,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:05:47","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":32184,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:05:47","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":1067,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:05:47","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n:\n x = i\n i = i + z\n z = x\n print(i)\n print(z)\n print(x)\n print(str(i))","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":12367,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:18","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":5845,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:18","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n:\n x = i\n i = i + z\n z = x\n return i","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":33031,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:18","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34548,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:49","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":18310,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:49","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n:\n x = i\n i = i + z\n z = x\n return x","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":2135,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:49","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":17678,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:08:06","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":19599,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:08:06","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n:\n x = i\n i = i + z\n z = x\n return z","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":37965,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:08:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":5697,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:37","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return z\n else:\n return 0","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":6649,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:37","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":28736,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:37","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":33823,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":19270,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":42277,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":42192,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":27229,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":18716,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":3872,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:21:55","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15453,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:21:55","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":23669,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:21:55","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":19192,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":16255,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":4785,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":8659,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def index(str, letter, x):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":18896,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def index(str, letter, x):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":22860,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":27889,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def index(str, letter, x):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":34464,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":41254,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":33548,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 15:39:28","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":20182,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 15:39:28","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":6967,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 15:39:28","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":31458,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:12","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":33040,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:12","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":2795,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:12","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n x = letter[0]\n for ch in str:\n if ch == x:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":35094,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:50","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n x = letter[0]\n for ch in str:\n if ch == x:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":26172,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:50","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":3853,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:50","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":19036,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":3828,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":26961,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n x = letter[0]\n for ch in str:\n if ch == x:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":41019,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":7976,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n x = letter[0]\n for ch in str:\n if ch == x:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":7835,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":14912,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":20585,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n x = letter[0]\n for ch in str:\n if ch == x:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":14276,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":31442,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":5039,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:33","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fin[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":1978,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:33","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":9692,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":11627,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":16334,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":41298,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":18460,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":36653,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":13204,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:03:44","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":17242,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:03:44","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15958,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:03:44","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":20711,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":20601,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":35273,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def index(str, letter, num):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":21507,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":12096,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":40351,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":6512,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":38578,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def index(str, letter, num):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":33034,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def index(str, letter, num):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":1583,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:43:38","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":17162,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:43:38","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":29458,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:43:38","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":42482,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":3598,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":3639,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":3126,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22237,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":18899,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":23299,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":17314,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":35291,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":31313,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 17:58:08","func_code":"def search(x, letter):\n if letter.isalpha() and type(x) == str:\n print('ok')\n else:\n print('false')","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":33194,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 17:58:49","func_code":"def search(x, letter):\n if letter.isalpha() and type(x) == str:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":21503,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 17:59:24","func_code":"def search(x, letter):\n if letter.isalpha() and type(x) == str:\n print('True')\n else:\n print('False')\n return","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":20978,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:01:40","func_code":"def search(x, letter):\n if letter.isalpha() and type(x) == str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":16003,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:07:11","func_code":"def search(x, letter):\n if type(x) == str and letter.isalpha():\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":23223,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:13:28","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":2395,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:20:31","func_code":"def search(string, letter):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":8179,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:20:31","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":30285,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:22:16","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":9627,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:22:16","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":40371,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":29067,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":32555,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":26536,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":38395,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":27548,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":19802,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":38183,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":8262,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":33219,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 18:37:10","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":39706,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 18:37:10","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":13081,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 18:37:49","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":20210,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 18:37:49","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":2249,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15189,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":17221,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":30719,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":21850,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":23215,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":28739,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":4803,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":34083,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":12459,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":20138,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":11736,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":41295,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:18:20","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":16655,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:18:20","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":111,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:18:20","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":32487,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:22:59","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":14578,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:22:59","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":21057,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:22:59","func_code":"def index(str, letter):\n if pos == len(str):\n return 0\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":1958,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:25","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":35067,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:25","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return 0\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":8321,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:25","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":23936,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":41035,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":4637,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":13931,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":26361,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22955,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":22924,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":19574,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":37126,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":1192,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":10832,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":37695,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":2598,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":26168,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":30801,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":17160,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":5933,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":27877,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":31099,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:03:37","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":21066,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:09:32","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":35579,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:09:32","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":37666,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:10:28","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":2301,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:10:28","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":23485,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:07","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return True\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":38774,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:07","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":41787,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:07","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":11993,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:25","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":21641,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:25","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":16574,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:25","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return True\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":23499,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:02","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":24141,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:02","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":14317,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:02","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":17945,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:22:36","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15319,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:22:36","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":2743,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:22:36","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i < n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i = i + 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":3480,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":3451,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":38610,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":17157,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":7365,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":31418,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":12745,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":3470,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":9711,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":42299,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:23:41","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":24390,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:23:41","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i = i + 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":12510,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:23:41","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":36605,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":42196,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":35880,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":32851,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":13003,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":7423,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":14568,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":363,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":25095,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":597,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:26:52","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":30676,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:26:52","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":19423,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:26:52","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i = i + 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":2161,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:27:54","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":30889,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:27:54","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i = i + 1\n return sum1","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":35988,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:27:54","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":12199,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:36:39","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":29788,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:36:39","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":15394,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:36:39","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":29106,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i = i + 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":39524,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15464,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":9081,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i = i + 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":14336,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":23379,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":14480,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":23644,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":5028,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":3656,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":21911,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":21796,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":10213,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":17156,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":40865,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":3365,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":12318,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":4145,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":17996,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":38777,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":41079,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":36952,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":25578,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":11027,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":20864,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":25391,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":23488,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":8801,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":3182,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":1798,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":28666,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:17","func_code":"def search(str, letter):\n if len(str) == 0:\n return 'False'\n elif str[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":22356,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:17","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":34329,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:17","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":20248,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":25395,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":26638,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def search(str, letter):\n if len(str) == 0:\n return 'False'\n elif str[0] == letter:\n return 'True'\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":23747,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":2583,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def search(str, letter):\n if len(str) == 0:\n return 'False'\n elif str[0] == letter:\n return 'True'\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":18828,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":3244,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def search(str, letter):\n if len(str) == 0:\n return 'False'\n elif str[0] == letter:\n return 'True'\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":23275,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":21120,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":21213,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:28","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":22091,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:28","func_code":"def search(str, letter):\n for item in str:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":25375,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:28","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":39358,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:45","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":1196,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:45","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":34667,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:45","func_code":"def search(str, letter):\n for item in str:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":33317,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:06","func_code":"def search(str, letter):\n for item in str:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":13808,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:06","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":36914,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:06","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":38029,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":40119,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":39272,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":33724,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":12618,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":3492,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":14918,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":24860,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":26488,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":30851,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:02:56","func_code":"def search(str, letter):\n if letter in str:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":12299,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:03:24","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":25300,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:05:42","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":6826,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:05:42","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return index(str, letter, i - 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":20562,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:05:42","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":22079,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:01","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":8669,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:01","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return index(str, letter, -1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":16209,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:01","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":37711,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:54","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":29723,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:54","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return index(str, letter, i - 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":21654,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:54","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":776,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:07:36","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":23787,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:07:36","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return index(str, letter, -1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":15064,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:07:36","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":4939,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:10:20","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return index(str, letter, -1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":6867,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:10:20","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":10856,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:14:45","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":13335,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:14:45","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return index(str, letter, -1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":12864,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:14:45","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22277,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:18:37","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":7474,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:18:37","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":28210,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:20:18","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":10451,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:20:18","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":23116,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:20:18","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n i += 1\n elif str[pos] == letter:\n return pos\n else:\n return inddex(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":26882,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":14154,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":6205,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n i += 1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":42169,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n i += 1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":33406,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":4137,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":31177,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":30118,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":20720,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n i += 1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":29834,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:27:19","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n print('True')\n i = i + 1\n print('False')","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":4589,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:28:10","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i = i + 1\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":42435,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:30:02","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":38595,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:30:02","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i = i + 1\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":1727,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:31:33","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":24323,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:31:33","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i = i + 1\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":42139,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i = i + 1\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":36738,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":23914,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i = i + 1\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":32762,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":11618,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i = i + 1\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":2186,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":32064,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:38:40","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":5277,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:38:40","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":3335,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:38:40","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n while fib[n]:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":40308,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:42:52","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n while fib[n]:\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":8106,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:42:52","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":36300,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:42:52","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":15884,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:22","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":1569,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:22","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":32951,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:22","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = 0\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":4330,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":33707,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":7019,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":5903,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":22793,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":10147,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":27946,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":27357,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":39806,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":8458,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":27063,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":32605,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":8088,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":39036,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":20235,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":12871,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:05:03","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":37490,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:05:03","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":16836,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:05:03","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":4270,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:08:13","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":17060,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:08:13","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":11393,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:08:13","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":31381,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:09:50","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":4567,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:09:50","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":10737,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:09:50","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":12034,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:11:33","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":19209,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:11:33","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":14328,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:11:33","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":30725,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:15:22","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":29212,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:15:22","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":10257,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:15:22","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":22324,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":2746,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":41302,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":19748,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":30336,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":18206,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":38251,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":12395,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":28822,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":6871,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":492,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i += 1\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":36577,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":5997,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":10945,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i += 1\n return 'False'","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":4393,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":19196,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":1597,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":36099,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":14012,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":19470,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":16352,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":1669,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":30563,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":25893,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":35481,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":491,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":6518,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":12509,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":17069,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":22009,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":20531,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":7107,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def index(str, letter, x):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":26688,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":36707,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":31795,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":10816,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":29363,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":27103,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def index(str, letter, x):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":12749,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def index(str, letter, x):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":32022,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:00:54","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":15667,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:03:21","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":16648,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:10:34","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n else:\n i = i + 1\n if i == len(str) and str[i] != letter:\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":5197,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:10:34","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34886,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n else:\n i = i + 1\n if i == len(str):\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":10062,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n else:\n i = i + 1\n if i == len(str):\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":8989,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":26778,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":341,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34279,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n else:\n i = i + 1\n if i == len(str):\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":3969,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":32962,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":12966,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":14424,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":17522,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":19037,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":20459,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":4068,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":16508,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":18578,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:22:43","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":40063,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:22:43","func_code":"def fibonacci(n):\n l = []\n if n <= 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":19808,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:22:43","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":40004,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:24:22","func_code":"def search(s, letter, pos):\n if pos == len(s):\n print('False')\n elif s[pos] == letter:\n print('True')\n else:\n return search(s, letter, pos + 1)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":35774,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:29:31","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":12731,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def fibonacci(n):\n l = []\n if n <= 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":6773,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def index(steve, letter, n):\n if letter != steve[n]:\n index(steve, letter, n + 1)\n else:\n return n","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":2111,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def fibonacci(n):\n l = []\n if n <= 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":33236,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":18638,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def fibonacci(n):\n l = []\n if n <= 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":20293,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34920,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def index(steve, letter, n):\n if letter != steve[n]:\n index(steve, letter, n + 1)\n else:\n return n","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":28349,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def index(steve, letter, n):\n if letter != steve[n]:\n index(steve, letter, n + 1)\n else:\n return n","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":11279,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34000,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:34:41","func_code":"def search(s, letter, pos):\n if pos == len(s):\n print('-1')\n elif s[pos] == letter:\n print(pos)\n else:\n return search(s, letter, pos + 1)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":6569,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:35:20","func_code":"def search(s, letter, pos):\n if pos == len(s):\n print('-1')\n elif s[pos] == letter:\n return pos\n else:\n return search(s, letter, pos + 1)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":8338,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:36:39","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":17227,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:36:39","func_code":"def index(s, letter, pos):\n if pos == len(s):\n print('-1')\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":24403,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:37:21","func_code":"def index(s, letter, pos):\n if pos == len(s):\n return '-1'\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":918,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:37:21","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":39092,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:42:24","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":1273,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:42:24","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":2473,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:42:24","func_code":"def index(s, letter, pos):\n if pos == len(s):\n return '-1'\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":8569,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:48:14","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":3200,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:48:14","func_code":"def index(s, letter, pos):\n if pos == len(s):\n return '-1'\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":20626,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:48:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":18523,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":30218,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":20011,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def index(s, letter, pos):\n if pos == len(s):\n return '-1'\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":41888,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":15259,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def index(s, letter, pos):\n if pos == len(s):\n return '-1'\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":20873,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":6667,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":37549,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def index(s, letter, pos):\n if pos == len(s):\n return '-1'\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":38594,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":33519,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:41:41","func_code":"def count_letters(s):\n if not s:\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":6653,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:41:41","func_code":"def count_letters(s):\n if not s:\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":12381,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:41:54","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":23185,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:41:54","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":30894,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:42:05","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n tail_max = maximum(l[1:])\n return l[0] if l[0] > tail_max else tail_max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":12571,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:42:05","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n tail_max = maximum(l[1:])\n return l[0] if l[0] > tail_max else tail_max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":35289,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:42:14","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":29802,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:25:24","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":20232,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:25:24","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":30650,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:25:47","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":41848,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:25:47","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":6503,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:26:02","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":18484,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:26:02","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":14034,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:26:23","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n min_index = i\n j = i + 1\n while j < len(A):\n if A[j] < A[min_index]:\n min_index = j\n j += 1\n A[i], A[min_index] = A[min_index], A[i]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35403,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:26:23","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n min_index = i\n j = i + 1\n while j < len(A):\n if A[j] < A[min_index]:\n min_index = j\n j += 1\n A[i], A[min_index] = A[min_index], A[i]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20059,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:26:23","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n min_index = i\n j = i + 1\n while j < len(A):\n if A[j] < A[min_index]:\n min_index = j\n j += 1\n A[i], A[min_index] = A[min_index], A[i]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21061,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-31 18:10:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n return r1 + r2 > distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":9576,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-31 18:10:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n return r1 + r2 > distance","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":24827,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":11365,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":5676,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":18205,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":14191,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":3076,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":34322,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":4786,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":42436,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":26601,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":36181,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":26899,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":6864,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":32298,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n fibN_2 = 0\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":2745,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n fibN_2 = 0\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":21492,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":26693,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":18096,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":13054,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":21306,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":39831,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":41444,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":34417,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":28819,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":27185,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":25895,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":16929,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":9444,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:06:03","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":12495,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:08:24","func_code":"def append2list(l1):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":41652,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:09:50","func_code":"def append2list(l1, l2=[]):\n l3 = []\n for i in l1:\n l3.append(i)\n return l3","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":2681,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:14:43","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n l3 = l2\n l2 = []\n return l3","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":17035,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:16:36","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n l3 = []\n l3 = l2\n l2 = []\n return l3","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11653,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:19:27","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2\n l2 = []","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":15141,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:20:35","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n l3 = l2\n l2 = []\n return l3","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25960,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:23:24","func_code":"def append2list(l1, l2=[]):\n if l2 == []:\n l3 = []\n for i in l1:\n l3.append(i)\n return l3\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":36882,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:24:03","func_code":"def append2list(l1, l2=[]):\n if l2 == []:\n l3 = []\n for i in l1:\n l3.append(i)\n return l3\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":20203,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:24:49","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l3 = []\n for i in l1:\n l3.append(i)\n return l3\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40932,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:24:49","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l3 = []\n for i in l1:\n l3.append(i)\n return l3\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":16887,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:24:49","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l3 = []\n for i in l1:\n l3.append(i)\n return l3\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":4060,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-14 11:26:40","func_code":"def append2list(l1, l2=[]):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11453,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-14 11:26:40","func_code":"def append2list(l1, l2=[]):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40825,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-14 11:31:06","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":26771,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-16 15:59:23","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = (x2 - x1) ** 2\n b = (y2 - y1) ** 2\n c = (a + b) ** 0.5\n total_r = r1 + r2\n if c < total_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":5730,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-16 15:59:23","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = (x2 - x1) ** 2\n b = (y2 - y1) ** 2\n c = (a + b) ** 0.5\n total_r = r1 + r2\n if c < total_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":15340,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-16 15:59:23","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = (x2 - x1) ** 2\n b = (y2 - y1) ** 2\n c = (a + b) ** 0.5\n total_r = r1 + r2\n if c < total_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":20851,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-16 18:42:45","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":24967,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-16 18:42:45","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":21838,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-16 18:50:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (x1 * x2) ** 2 + (y1 * y2) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":false} -{"submission_id":24806,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-16 18:51:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":27785,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-16 18:51:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":4601,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-17 15:01:35","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":7808,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-17 15:01:35","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":25667,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:18:11","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":37167,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:18:11","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":24386,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:18:31","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n tail_max = maximum(l[1:])\n return l[0] if l[0] > tail_max else tail_max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":16757,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:18:31","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n tail_max = maximum(l[1:])\n return l[0] if l[0] > tail_max else tail_max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":22301,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:18:54","func_code":"def count_letters(s):\n if not s:\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":33981,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:18:54","func_code":"def count_letters(s):\n if not s:\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":18976,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:19:17","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":16906,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:19:17","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":18694,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:19:41","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":6460,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:19:41","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":41691,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:20:02","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":6792,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:20:18","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":42440,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:20:18","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":12690,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:20:37","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n min_index = i\n j = i + 1\n while j < len(A):\n if A[j] < A[min_index]:\n min_index = j\n j += 1\n A[i], A[min_index] = A[min_index], A[i]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28887,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:20:37","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n min_index = i\n j = i + 1\n while j < len(A):\n if A[j] < A[min_index]:\n min_index = j\n j += 1\n A[i], A[min_index] = A[min_index], A[i]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33852,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:20:37","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n min_index = i\n j = i + 1\n while j < len(A):\n if A[j] < A[min_index]:\n min_index = j\n j += 1\n A[i], A[min_index] = A[min_index], A[i]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25619,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-21 11:14:52","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":32925,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-21 11:15:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":3728,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:16:00","func_code":"def minimum(l):\n return l.sort()[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":29316,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-21 11:18:49","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39371,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:20:22","func_code":"def minimum(l):\n return l.sort()[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":13863,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:21:51","func_code":"def minimum(l):\n l = l.sort()\n return l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":193,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:24:33","func_code":"def minimum(l):\n l.sort()\n return l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":26437,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:24:33","func_code":"def minimum(l):\n l.sort()\n return l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":26768,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:25:08","func_code":"def minimum(l):\n A = 'null'\n lowest = A\n for c in l:\n if lowest == A:\n lowest = c\n elif c < lowest:\n lowest = c\n return lowest","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":13731,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:25:08","func_code":"def minimum(l):\n A = 'null'\n lowest = A\n for c in l:\n if lowest == A:\n lowest = c\n elif c < lowest:\n lowest = c\n return lowest","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":21446,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:25:24","func_code":"def maximum(l):\n return l.sort()\n l[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":41261,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:25:48","func_code":"def maximum(l):\n l.sort()\n return l[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":21689,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:25:48","func_code":"def maximum(l):\n l.sort()\n return l[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":15763,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:25:53","func_code":"def maximum(l):\n A = 'null'\n highest = A\n for c in l:\n if maximum == A:\n maximum = c\n elif c > maximum:\n maximum = c\n return maximum","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":38717,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:27:11","func_code":"def maximum(l):\n A = 'null'\n highest = A\n for c in l:\n if highest == A:\n highest = c\n elif c > highest:\n highest = c\n return highest","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":37701,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:27:11","func_code":"def maximum(l):\n A = 'null'\n highest = A\n for c in l:\n if highest == A:\n highest = c\n elif c > highest:\n highest = c\n return highest","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":36106,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:28:58","func_code":"def count_letters(s):\n str_len = 0\n for c in s:\n str_len += 1\n return str_len","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":15053,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:28:58","func_code":"def count_letters(s):\n str_len = 0\n for c in s:\n str_len += 1\n return str_len","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":5923,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:29:29","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n mini = minimum(l[1:])\n if l[0] < mini:\n return l[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":42205,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:29:29","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n mini = minimum(l[1:])\n if l[0] < mini:\n return l[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":38208,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:29:44","func_code":"def minimum(a):\n tmp = a[0]\n for i in a:\n if i < tmp:\n tmp = i\n return tmp","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":10228,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:29:44","func_code":"def minimum(a):\n tmp = a[0]\n for i in a:\n if i < tmp:\n tmp = i\n return tmp","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":13560,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:30:00","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":19392,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:30:00","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":6678,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:31:01","func_code":"def maximum(a):\n tmp = a[0]\n for i in a:\n if i > tmp:\n tmp = i\n return tmp","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":23947,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:31:01","func_code":"def maximum(a):\n tmp = a[0]\n for i in a:\n if i > tmp:\n tmp = i\n return tmp","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":11318,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:31:01","func_code":"def maximum(a):\n tmp = a[0]\n for i in a:\n if i > tmp:\n tmp = i\n return tmp","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":2931,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:31:02","func_code":"def reverse_list(l):\n new_list = []\n for c in l:\n new_list.append(l.pop)\n return new_list","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":13958,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:31:04","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n maxi = maximum(l[1:])\n if l[0] > maxi:\n return l[0]\n else:\n return maxi","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":11433,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:31:04","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n maxi = maximum(l[1:])\n if l[0] > maxi:\n return l[0]\n else:\n return maxi","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":41399,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:33:42","func_code":"def minimum(l):\n if not l or len(l) == 1:\n return l\n tail_min = minimum(l[1:])\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":23890,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:34:43","func_code":"def reverse_list(l):\n new_list = []\n for c in l:\n new_list.append(l.pop())\n return new_list","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":13750,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:35:17","func_code":"def minimum(l):\n if not l:\n return l\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n if tail_min == []:\n return l[0]\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":35608,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:35:17","func_code":"def minimum(l):\n if not l:\n return l\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n if tail_min == []:\n return l[0]\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":15784,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:37:10","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n mini = minimum(l[1:])\n if l[0] < mini:\n return l[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":840,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:37:10","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n mini = minimum(l[1:])\n if l[0] < mini:\n return l[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":26962,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:38:21","func_code":"def maximum(l):\n if not l:\n return l\n if len(l) == 1:\n return l[0]\n tail_max = maximum(l[1:])\n if tail_max == []:\n return l[0]\n return l[0] if l[0] > tail_max else tail_max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":2379,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:38:21","func_code":"def maximum(l):\n if not l:\n return l\n if len(l) == 1:\n return l[0]\n tail_max = maximum(l[1:])\n if tail_max == []:\n return l[0]\n return l[0] if l[0] > tail_max else tail_max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":31180,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:39:25","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n maxi = maximum(l[1:])\n if l[0] > maxi:\n return l[0]\n else:\n return maxi","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":9856,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:39:25","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n maxi = maximum(l[1:])\n if l[0] > maxi:\n return l[0]\n else:\n return maxi","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":3403,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:41:18","func_code":"def count_letters(string):\n if not string:\n return 0\n return count_letters(string[1:] + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":6021,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:42:00","func_code":"def reverse_list(l):\n new_list = []\n for c in l:\n new_list.append(l.pop())\n new_list.append(l.pop())\n return new_list","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":2611,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:42:04","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n elif minimum(l[0:len(l)]) < minimum(l[len(l) + 1:]):\n return minimum(l[0:len(l)])\n else:\n return minimum(l[len(l) + 1:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":36100,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:44:05","func_code":"def reverse_list(l):\n new_list = []\n i = 0\n while len(l) > i:\n new_list.append(l.pop())\n i += 1\n return new_list","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":12224,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:45:31","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n mini = minimum(l[1:])\n if l[0] < mini:\n return l[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":2067,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:45:31","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n mini = minimum(l[1:])\n if l[0] < mini:\n return l[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":8131,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 11:46:09","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n smallest = minimum(l[1:])\n if l[0] < smallest:\n return l[0]\n else:\n return smallest","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":6123,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 11:46:09","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n smallest = minimum(l[1:])\n if l[0] < smallest:\n return l[0]\n else:\n return smallest","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":10403,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:46:13","func_code":"def count_letters(string):\n if not string:\n return 0\n return count_letters(string[1:]) + 1","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":30977,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:46:13","func_code":"def count_letters(string):\n if not string:\n return 0\n return count_letters(string[1:]) + 1","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":8495,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:46:34","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n m = maximum(l[1:])\n if l[0] > m:\n return l[0]\n else:\n return m","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":21490,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:46:34","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n m = maximum(l[1:])\n if l[0] > m:\n return l[0]\n else:\n return m","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":12001,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:47:00","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":2777,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:47:00","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":1386,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:48:11","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n smaller = minimum(l[1:])\n if l[0] < smaller:\n return l[0]\n return smaller","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":25328,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:48:11","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n smaller = minimum(l[1:])\n if l[0] < smaller:\n return l[0]\n return smaller","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":16236,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:48:15","func_code":"def count_letters(s):\n if len(s) == 1:\n return 1\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":25922,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:48:43","func_code":"def count_letters(s):\n if len(s) == 0:\n return 0\n elif len(s) == 1:\n return 1\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":37003,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:48:43","func_code":"def count_letters(s):\n if len(s) == 0:\n return 0\n elif len(s) == 1:\n return 1\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":29059,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:49:48","func_code":"def reverse_list(l):\n return l[-1] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":21049,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:50:13","func_code":"def reverse_list(l):\n if len(l) == 1:\n return l\n return l[-1] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":26414,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:50:39","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n smaller = maximum(l[1:])\n if l[0] > smaller:\n return l[0]\n return smaller","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":4921,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:51:15","func_code":"def reverse_list(l):\n if len(l) == 1:\n return l\n return l[-1].extend(reverse_list(l[:-1]))","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":18538,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:51:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return l\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":17553,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:51:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return l\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":40886,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:51:55","func_code":"def reverse_list(l):\n if len(l) == 1:\n return l\n return [l[-1]].extend(reverse_list(l[:-1]))","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":11998,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 11:52:12","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n biggest = maximum(l[1:])\n if l[0] > biggest:\n return l[0]\n else:\n return biggest","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":6934,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 11:52:12","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n biggest = maximum(l[1:])\n if l[0] > biggest:\n return l[0]\n else:\n return biggest","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":33095,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:52:23","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n bigger = maximum(l[1:])\n if l[0] > bigger:\n return l[0]\n return bigger","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":35619,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:52:23","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n bigger = maximum(l[1:])\n if l[0] > bigger:\n return l[0]\n return bigger","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":23870,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:52:34","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":7501,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-21 11:52:36","func_code":"def selectionsort(a):\n return 'fuck my life and everything in between'","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10218,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:52:40","func_code":"def reverse_list(l):\n if len(l) == 1:\n return l\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":8606,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:52:43","func_code":"def maximum(lst):\n if len(lst) == 1:\n return lst[0]\n maxi = maximum(lst[1:])\n if lst[0] > maxi:\n return lst[0]\n else:\n return maxi","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":2381,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:52:43","func_code":"def maximum(lst):\n if len(lst) == 1:\n return lst[0]\n maxi = maximum(lst[1:])\n if lst[0] > maxi:\n return lst[0]\n else:\n return maxi","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":24072,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:52:49","func_code":"def minimum(lst):\n if len(lst) == 1:\n return lst[0]\n mini = minimum(lst[1:])\n if lst[0] < mini:\n return lst[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":29204,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:52:49","func_code":"def minimum(lst):\n if len(lst) == 1:\n return lst[0]\n mini = minimum(lst[1:])\n if lst[0] < mini:\n return lst[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":21558,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:52:55","func_code":"def reverse_list(a):\n if a == []:\n return []\n temp = reverse_list(a[1:])\n temp.append(a[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":28461,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:52:55","func_code":"def reverse_list(a):\n if a == []:\n return []\n temp = reverse_list(a[1:])\n temp.append(a[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":39520,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:53:06","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":34373,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:53:06","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":7922,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:53:29","func_code":"def reverse_list(l):\n if len(l) == 1 or not l:\n return l\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":32066,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:53:29","func_code":"def reverse_list(l):\n if len(l) == 1 or not l:\n return l\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":42297,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:54:00","func_code":"def reverse_list(ls):\n return ls.reverse()","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":7494,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-21 11:54:30","func_code":"def selectionsort(a):\n start = time.time()\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":12434,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-21 11:54:30","func_code":"def selectionsort(a):\n start = time.time()\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":31415,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:55:39","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":23777,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:55:39","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":28460,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:56:23","func_code":"def reverse_list(l):\n if len(l) == 1:\n return l\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":23199,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:57:45","func_code":"def fibonacci(n):\n return n * fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":41796,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:58:00","func_code":"def reverse_list(ls):\n ls.reverse()\n return ls","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":27605,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:58:00","func_code":"def reverse_list(ls):\n ls.reverse()\n return ls","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":17978,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:58:38","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":41169,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:58:38","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":33460,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:58:59","func_code":"def reverse_list(l):\n if l == []:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":7371,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:58:59","func_code":"def reverse_list(l):\n if l == []:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":5709,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:59:33","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":28874,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:00:09","func_code":"def minimum(l):\n smallest = l[0]\n for e in l:\n if e < smallest:\n smallest = e\n return smallest","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":35006,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:00:09","func_code":"def minimum(l):\n smallest = l[0]\n for e in l:\n if e < smallest:\n smallest = e\n return smallest","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":34978,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:00:32","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":16612,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:00:32","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":30697,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:01:33","func_code":"def maximum(l):\n biggest = l[0]\n for e in l:\n if e < biggest:\n biggest = e\n return biggest","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":13040,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:01:33","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":28113,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:01:33","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":7944,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:01:55","func_code":"def reverse_list(a):\n if a == []:\n return []\n tmp = reverse_list(a[1:])\n tmp.append(a[0])\n return tmp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":36084,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:01:55","func_code":"def reverse_list(a):\n if a == []:\n return []\n tmp = reverse_list(a[1:])\n tmp.append(a[0])\n return tmp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":35678,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:01:56","func_code":"def maximum(l):\n biggest = l[0]\n for e in l:\n if e > biggest:\n biggest = e\n return biggest","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":23182,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:01:56","func_code":"def maximum(l):\n biggest = l[0]\n for e in l:\n if e > biggest:\n biggest = e\n return biggest","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":13498,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:03:54","func_code":"def reverse_list(l):\n if len(l) == 1:\n return l\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":15580,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:05:45","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":11369,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:05:45","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":875,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:06:07","func_code":"def reverse_list(l):\n if len(l) == 1:\n return list(l)\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":34016,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 12:06:16","func_code":"def count_letters(s):\n if not s:\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":10127,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 12:06:16","func_code":"def count_letters(s):\n if not s:\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":20773,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:06:43","func_code":"def reverse_list(l):\n if l == []:\n return []\n if len(l) == 1:\n return l\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":17560,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:07:15","func_code":"def reverse_list(l):\n if not l:\n return []\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":35737,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:07:25","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":36019,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:07:25","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":40223,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:07:51","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":14291,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:07:51","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":35715,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:08:23","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":10824,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:08:23","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":20082,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:08:24","func_code":"def minimum(a):\n m = a[0]\n for n in a:\n if n < m:\n n == m\n return m","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":1501,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 12:08:28","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":2190,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 12:08:28","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":18101,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:08:46","func_code":"def minimum(a):\n m = a[0]\n for n in a:\n if n < m:\n m = n\n return m","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":13630,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:08:46","func_code":"def minimum(a):\n m = a[0]\n for n in a:\n if n < m:\n m = n\n return m","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":21027,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:09:27","func_code":"def maximum(a):\n m = a[0]\n for n in a:\n if n > m:\n m = n\n return m","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":7935,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:09:27","func_code":"def maximum(a):\n m = a[0]\n for n in a:\n if n > m:\n m = n\n return m","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":4680,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:09:46","func_code":"def reverse_list(l):\n if not l:\n return l\n else:\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":37122,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:09:46","func_code":"def reverse_list(l):\n if not l:\n return l\n else:\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":26233,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:11:10","func_code":"def count_letters(s):\n i = 0\n for c in s:\n i += 1\n return i","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":31311,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:11:10","func_code":"def count_letters(s):\n i = 0\n for c in s:\n i += 1\n return i","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":33045,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 12:11:29","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":3864,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 12:11:29","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":4192,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:12:12","func_code":"def count_letters(word):\n if not word:\n return 0\n return 1 + word[:-1]","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":20633,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:12:46","func_code":"def reverse_list(a):\n b = []\n for s in a:\n b.append(-1)\n return b","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":876,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:12:54","func_code":"def count_letters(word):\n if not word:\n return 0\n return 1 + count_letters(word[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":6718,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:12:54","func_code":"def count_letters(word):\n if not word:\n return 0\n return 1 + count_letters(word[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":357,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:13:40","func_code":"def reverse_list(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[-i - 1])\n i += 1\n return b","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":11031,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 12:14:56","func_code":"def swap(l, i, j):\n temp = l[i]\n l[i] = l[j]\n l[j] = temp\n\n\ndef quicksort(l, p, r):\n if r <= p:\n return l\n q = p\n for j in range(p, r):\n if l[j] <= l[r]:\n swap(l, j, q)\n q += 1\n swap(l, q, r)\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)\n return l","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":36103,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 12:14:56","func_code":"def swap(l, i, j):\n temp = l[i]\n l[i] = l[j]\n l[j] = temp\n\n\ndef quicksort(l, p, r):\n if r <= p:\n return l\n q = p\n for j in range(p, r):\n if l[j] <= l[r]:\n swap(l, j, q)\n q += 1\n swap(l, q, r)\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)\n return l","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":1940,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:15:32","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return A\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":21608,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:15:32","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return A\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":13323,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:15:50","func_code":"def fibonacci(n):\n a = 0\n b = 1\n while a < n:\n a += b\n a, b = b, a\n print(a)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":26783,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:16:21","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":37574,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:16:21","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":12527,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:17:50","func_code":"def fibonacci(n):\n a = 0\n b = 1\n l = []\n while a < n:\n a += b\n a, b = b, a\n l.append(a)\n return l(len.l() - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":16794,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:18:34","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":21564,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:18:34","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":35590,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:18:46","func_code":"def partition(l, p, r):\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n return q\n\n\ndef quicksort(l, p, r):\n if r <= p:\n return l\n q = partition(l, p, r)\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":33325,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:18:46","func_code":"def partition(l, p, r):\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n return q\n\n\ndef quicksort(l, p, r):\n if r <= p:\n return l\n q = partition(l, p, r)\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":7496,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:20:37","func_code":"def reverse_list(l):\n if not l:\n return []\n return reverse_list[0].append(reverse_list[1:])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":21463,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:20:57","func_code":"def reverse_list(l):\n if not l:\n return []\n return reverse_list[0].append(reverse_list(l[1:]))","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":24090,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:21:18","func_code":"def reverse_list(l):\n if not l:\n return []\n return l[0].append(reverse_list(l[1:]))","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":13552,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:21:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":12806,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:21:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20136,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:21:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":27710,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:21:44","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":10550,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:21:44","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":805,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:21:58","func_code":"def reverse_list(l):\n if not l:\n return []\n return [l[0]].append(reverse_list(l[1:]))","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":20523,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:21:58","func_code":"def fibonacci(n):\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[int(len(l) - 1)]","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":7763,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:23:00","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":27470,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:23:13","func_code":"def reverse_list(l):\n if not l:\n return []\n return [l[0]].append(reverse_list(l[1:]))","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":26061,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:23:26","func_code":"def reverse_list(a):\n if a == []:\n return a\n else:\n return reverse_list(a[1:]).append(a[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":33000,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:24:34","func_code":"def reverse_list(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[-i - 1])\n i += 1\n return b","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":11002,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:24:34","func_code":"def reverse_list(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[-i - 1])\n i += 1\n return b","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":27219,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:25:22","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33997,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:25:22","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":19481,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:25:22","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28437,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:25:30","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5021,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:25:30","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25278,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:25:30","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":9504,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:25:53","func_code":"def fibonacci(n):\n try:\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[int(len(l) - 1)]\n except:\n return 1","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":40955,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 12:26:12","func_code":"def selectionsort(l):\n N = len(l)\n p = 0\n j = 1\n while j < N:\n if l[j] < l[p]:\n p = j\n j += 1\n return p","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":7872,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 12:26:12","func_code":"def selectionsort(l):\n N = len(l)\n p = 0\n j = 1\n while j < N:\n if l[j] < l[p]:\n p = j\n j += 1\n return p","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27855,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 12:26:12","func_code":"def selectionsort(l):\n N = len(l)\n p = 0\n j = 1\n while j < N:\n if l[j] < l[p]:\n p = j\n j += 1\n return p","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":25716,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:26:39","func_code":"def reverse_list(l):\n if not l:\n return []\n return [l[0]].append(reverse_list(l[1:]))","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":6742,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:28:14","func_code":"def selectionsort(l):\n i = 0\n while i < len(l):\n p = i\n j = i + 1\n while j < len(l):\n if l[j] < l[p]:\n p = j\n j = j + 1\n tmp = l[p]\n l[p] = l[i]\n l[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41318,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:28:14","func_code":"def selectionsort(l):\n i = 0\n while i < len(l):\n p = i\n j = i + 1\n while j < len(l):\n if l[j] < l[p]:\n p = j\n j = j + 1\n tmp = l[p]\n l[p] = l[i]\n l[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":36236,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:28:57","func_code":"def fibonacci(n):\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[-1]","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":8584,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:29:04","func_code":"def reverse_list(l):\n if not l or len(l) == 1:\n return l\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":11135,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:29:04","func_code":"def reverse_list(l):\n if not l or len(l) == 1:\n return l\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":40598,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 12:30:06","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":22377,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 12:30:06","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":24651,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:37:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return ()\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":25097,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:37:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return ()\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":25088,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:38:42","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n print(l)\n return l[-1]","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":8858,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:38:54","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[-1]","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":35680,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:40:22","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[-1]","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":5427,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:40:22","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[-1]","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":34733,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:40:22","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[-1]","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":23507,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 12:42:01","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":13289,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 12:42:01","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":35654,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 12:46:23","func_code":"def minimum(n=[]):\n List = sorted(n)\n return List[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":16810,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 12:46:23","func_code":"def minimum(n=[]):\n List = sorted(n)\n return List[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":16001,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 12:47:33","func_code":"def maximum(n=[]):\n List = sorted(n)\n return List[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":2060,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 12:47:33","func_code":"def maximum(n=[]):\n List = sorted(n)\n return List[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":2201,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:48:27","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8986,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:49:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":16457,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:49:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":883,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:49:57","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23382,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:49:57","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":36347,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:49:57","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":24004,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 12:50:02","func_code":"def selectionsort(l):\n for i in range(1, len(l)):\n for j in range(i, 0, -1):\n if l[j] < l[j - 1]:\n temp = l[j]\n l[j] = l[j - 1]\n l[j - 1] = temp","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":27701,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 12:50:02","func_code":"def selectionsort(l):\n for i in range(1, len(l)):\n for j in range(i, 0, -1):\n if l[j] < l[j - 1]:\n temp = l[j]\n l[j] = l[j - 1]\n l[j - 1] = temp","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28784,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 12:50:02","func_code":"def selectionsort(l):\n for i in range(1, len(l)):\n for j in range(i, 0, -1):\n if l[j] < l[j - 1]:\n temp = l[j]\n l[j] = l[j - 1]\n l[j - 1] = temp","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":27649,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:52:10","func_code":"def fibonacci(n):\n if n < 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":21266,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:52:10","func_code":"def fibonacci(n):\n if n < 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":35793,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:52:10","func_code":"def fibonacci(n):\n if n < 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":313,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 13:00:43","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fib(n - 1) + fib(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":17012,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 13:01:19","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":30472,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 13:01:49","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":13478,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 13:01:49","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":31033,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 13:01:49","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":7341,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:03:26","func_code":"def minimum(l):\n min = sum(l)\n for i in l:\n if i < min:\n min = i\n return min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":26663,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:03:26","func_code":"def minimum(l):\n min = sum(l)\n for i in l:\n if i < min:\n min = i\n return min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":10884,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:04:43","func_code":"def maximum(l):\n max = -1 * sum(l)\n for i in l:\n if i > max:\n max = i\n return max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":15440,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:04:43","func_code":"def maximum(l):\n max = -1 * sum(l)\n for i in l:\n if i > max:\n max = i\n return max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":21031,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:05:52","func_code":"def count_letters(s):\n count = 0\n for i in s:\n count += 1\n return count","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":28664,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:05:52","func_code":"def count_letters(s):\n count = 0\n for i in s:\n count += 1\n return count","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":12660,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:06:32","func_code":"def reverse_list(l):\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":17421,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:06:32","func_code":"def reverse_list(l):\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":29518,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:08:45","func_code":"def fibonacci(n):\n fibonacci = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]\n return fibonacci[n]","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":34986,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:08:45","func_code":"def fibonacci(n):\n fibonacci = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]\n return fibonacci[n]","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":26356,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 13:20:05","func_code":"def selectionsort(a):\n if len(a) != 2:\n a = [[], a]\n mini = min(a[1])\n a[1].remove(mini)\n a[0].append(mini)\n if len(a[1]) == 0:\n return a[0]\n else:\n return selectionsort(a)","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":42177,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 13:20:34","func_code":"def smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selectionsort(a):\n i = 0\n while i < len(a):\n p = smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":7716,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 13:20:34","func_code":"def smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selectionsort(a):\n i = 0\n while i < len(a):\n p = smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":2555,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 13:20:34","func_code":"def smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selectionsort(a):\n i = 0\n while i < len(a):\n p = smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":37454,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:21:48","func_code":"def quicksort(a, n, b):\n a = sorted(a)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":1410,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:21:48","func_code":"def quicksort(a, n, b):\n a = sorted(a)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":41927,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:21:48","func_code":"def quicksort(a, n, b):\n a = sorted(a)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":28074,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 15:38:24","func_code":"def selectionsort(A):\n for i in range(len(A)):\n mini = i\n for j in range(i, len(A)):\n if A[j] < A[mini]:\n mini = j\n A[i], A[mini] = A[mini], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":16941,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 15:38:24","func_code":"def selectionsort(A):\n for i in range(len(A)):\n mini = i\n for j in range(i, len(A)):\n if A[j] < A[mini]:\n mini = j\n A[i], A[mini] = A[mini], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":2438,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:15:00","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":27875,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:15:00","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":34333,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:18:14","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[1])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":27115,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:19:00","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":37184,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:19:00","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":19598,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:22:21","func_code":"def count_letters(word):\n total = 0\n for c in word:\n total += 1\n return total","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":41636,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:22:21","func_code":"def count_letters(word):\n total = 0\n for c in word:\n total += 1\n return total","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":40362,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:26:58","func_code":"def reverse_list(l):\n new = []\n i = 0\n while i < len(l):\n new.append(l[len(l) - i - 1])\n i += 1\n return new","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":6320,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:27:21","func_code":"def reverse_list(l):\n new = []\n i = 0\n while i < len(l):\n new.append(l[len(l) - i - 1])\n i += 1\n return new","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":31684,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:27:21","func_code":"def reverse_list(l):\n new = []\n i = 0\n while i < len(l):\n new.append(l[len(l) - i - 1])\n i += 1\n return new","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":41316,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:31:09","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":71,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:31:09","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":19317,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:48:09","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":41357,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:48:09","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":19717,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:48:09","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":20500,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:35:44","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":40303,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:35:44","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":20067,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:36:15","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":8719,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:36:15","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":26728,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:39:34","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":41275,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:39:34","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":853,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:39:59","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":2671,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:39:59","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":20578,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:40:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":37138,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:40:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":15146,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:40:55","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":38116,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:40:55","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":33027,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:41:42","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":17925,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:41:42","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":28294,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:41:42","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":6488,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-21 21:24:50","func_code":"def minimum(numbers):\n count = 0\n for i in numbers:\n if i > count:\n count = i\n return count","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":37465,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-21 21:26:24","func_code":"def minimum(numbers):\n count = numbers[0]\n for i in numbers:\n if i < count:\n count = i\n return count","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":13058,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-21 21:26:24","func_code":"def minimum(numbers):\n count = numbers[0]\n for i in numbers:\n if i < count:\n count = i\n return count","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":41319,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 21:38:26","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":34544,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 21:38:26","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":28743,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 21:39:51","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":5153,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 21:39:51","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":38815,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 22:03:07","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":15185,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 22:03:07","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":20133,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 22:09:03","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":6036,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 22:09:03","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":190,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 22:33:17","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":32709,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 22:33:17","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":11215,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 23:14:55","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":37426,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 23:14:55","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":36500,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 23:15:48","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":38584,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 23:15:48","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":8800,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 23:15:48","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":20335,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-22 00:45:06","func_code":"def count_letters(line=''):\n print(len(line))","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":26407,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-22 00:45:24","func_code":"def count_letters(line=''):\n return len(line)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":35337,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-22 00:45:24","func_code":"def count_letters(line=''):\n return len(line)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":11704,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-22 00:45:24","func_code":"def count_letters(line=''):\n return len(line)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":39680,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:33:26","func_code":"def minimum(s):\n min = s[0]\n for c in s[1:]:\n if c < min:\n min = c\n return min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":10999,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:35:34","func_code":"def maximum(s):\n max = s[0]\n for c in s[1:]:\n if c > max:\n max = c\n return max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":22299,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:48:39","func_code":"def reverse_list(s):\n return s[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":1119,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:50:18","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":3802,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:50:18","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":10386,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:57:15","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":38442,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:57:15","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":10196,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:58:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":22642,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:58:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":8514,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:00:50","func_code":"def count_letters(s):\n if len(s) == 0:\n return 0\n s = list(s)\n s.remove(s[0])\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":6939,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:00:50","func_code":"def count_letters(s):\n if len(s) == 0:\n return 0\n s = list(s)\n s.remove(s[0])\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":22709,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:15:26","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":18391,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:15:26","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":22649,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:16:37","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":23774,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:16:37","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":29652,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:18:00","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n t = s[-1]\n s.pop()\n return [t] + reverse_list(s)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":23891,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:18:00","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n t = s[-1]\n s.pop()\n return [t] + reverse_list(s)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":5333,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:18:00","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n t = s[-1]\n s.pop()\n return [t] + reverse_list(s)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":25062,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-23 15:17:46","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":10415,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-23 15:17:46","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":13166,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-23 15:17:46","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":32109,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 16:32:36","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":26875,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 16:32:36","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":9516,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 16:39:55","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":4252,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 16:39:55","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":40154,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 17:04:55","func_code":"def minimum(a):\n i = 1\n mini = a[0]\n while i < len(a):\n if mini < a[i]:\n mini = mini\n elif mini > a[i]:\n mini = a[i]\n i += 1\n return mini","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":16526,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 17:04:55","func_code":"def minimum(a):\n i = 1\n mini = a[0]\n while i < len(a):\n if mini < a[i]:\n mini = mini\n elif mini > a[i]:\n mini = a[i]\n i += 1\n return mini","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":13028,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:05:33","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":38277,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:05:33","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":817,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 17:08:49","func_code":"def maximum(a):\n i = 1\n mini = a[0]\n while i < len(a):\n if mini > a[i]:\n mini = mini\n elif mini < a[i]:\n mini = a[i]\n i += 1\n return mini","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":4827,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 17:08:49","func_code":"def maximum(a):\n i = 1\n mini = a[0]\n while i < len(a):\n if mini > a[i]:\n mini = mini\n elif mini < a[i]:\n mini = a[i]\n i += 1\n return mini","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":37918,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:12:59","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":31259,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:13:17","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":26715,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:13:17","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":42425,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:19:52","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":29542,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:19:52","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":39517,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:37:56","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":1591,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:37:56","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":12283,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:43:14","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":40669,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:43:14","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5796,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:43:14","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":26446,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 17:46:16","func_code":"def count_letters(a):\n al = list(a)\n tot = 0\n for c in al:\n tot += +1\n return tot","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":19859,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 17:46:16","func_code":"def count_letters(a):\n al = list(a)\n tot = 0\n for c in al:\n tot += +1\n return tot","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":40299,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 19:00:44","func_code":"def reverse_list(a):\n return a[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":38881,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 19:00:44","func_code":"def reverse_list(a):\n return a[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":38754,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:35:16","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":32999,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:35:16","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":16773,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:10","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":28900,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:10","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":15473,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:15","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":24307,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:15","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":1896,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:20","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":20028,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:20","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":38649,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:32","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23224,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:32","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21326,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:38:20","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":10469,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:38:20","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":29769,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 19:58:14","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":13238,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 19:58:14","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":25915,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 20:51:53","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":31205,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 20:51:53","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":10208,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 20:59:30","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":16828,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 20:59:30","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":31747,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 21:04:17","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":28696,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 21:04:17","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":1460,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 21:04:17","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":10412,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-23 23:55:49","func_code":"def minimum(line=[]):\n m = line[0]\n for i in line:\n if i < m:\n m = i\n return m","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":23133,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-23 23:55:49","func_code":"def minimum(line=[]):\n m = line[0]\n for i in line:\n if i < m:\n m = i\n return m","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":38782,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-23 23:58:52","func_code":"def maximum(line=[]):\n m = line[0]\n for i in line:\n if i > m:\n m = i\n return m","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":27715,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-23 23:58:52","func_code":"def maximum(line=[]):\n m = line[0]\n for i in line:\n if i > m:\n m = i\n return m","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":34375,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-23 23:58:52","func_code":"def maximum(line=[]):\n m = line[0]\n for i in line:\n if i > m:\n m = i\n return m","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":40374,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 00:05:47","func_code":"def reverse_list(a=[]):\n a.reverse()\n return a","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":19293,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 00:05:47","func_code":"def reverse_list(a=[]):\n a.reverse()\n return a","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":2128,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 00:11:01","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":7297,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 00:11:01","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":38332,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 01:51:34","func_code":"def selectionsort(a):\n for i in range(len(a)):\n for j in range(i + 1, len(a)):\n if a[i] > a[j]:\n a[i], a[j] = a[j], a[i]\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":29396,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 01:51:46","func_code":"def selectionsort(a):\n for i in range(len(a)):\n for j in range(i + 1, len(a)):\n if a[i] > a[j]:\n a[i], a[j] = a[j], a[i]\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":29277,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 01:51:46","func_code":"def selectionsort(a):\n for i in range(len(a)):\n for j in range(i + 1, len(a)):\n if a[i] > a[j]:\n a[i], a[j] = a[j], a[i]\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":31648,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 01:56:29","func_code":"def quicksort(a):\n less = []\n equal = []\n greater = []\n if len(a) > 1:\n pivot = a[0]\n for x in a:\n if x < pivot:\n less.append(x)\n if x == pivot:\n equal.append(x)\n if x > pivot:\n greater.append(x)\n return sort(less) + equal + sort(greater)\n else:\n return a","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":38176,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 02:01:06","func_code":"def quicksort(a):\n less = []\n equal = []\n greater = []\n if len(a) > 1:\n pivot = a[0]\n for x in a:\n if x < pivot:\n less.append(x)\n if x == pivot:\n equal.append(x)\n if x > pivot:\n greater.append(x)\n return sort(less) + equal + sort(greater)\n else:\n return a","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":21469,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 02:04:13","func_code":"def quicksort(a):\n less = []\n equal = []\n greater = []\n if len(a) > 1:\n pivot = a[0]\n for x in a:\n if x < pivot:\n less.append(x)\n if x == pivot:\n equal.append(x)\n if x > pivot:\n greater.append(x)\n return sort(less) + equal + sort(greater)\n else:\n return a","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":33334,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 02:05:26","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n return A","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":6516,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 02:05:26","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n return A","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":35036,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 02:05:26","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n return A","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":25346,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:20:02","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":40892,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:20:02","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":17606,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:41:41","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":30343,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:41:41","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":10611,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:47:48","func_code":"def fibonacci(N):\n if N == 0 or N == 1:\n return 1\n return fibonacci(N - 1) + fibonacci(N - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":4110,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:47:48","func_code":"def fibonacci(N):\n if N == 0 or N == 1:\n return 1\n return fibonacci(N - 1) + fibonacci(N - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":36668,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 12:00:08","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return ()\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":32721,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 12:00:08","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return ()\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":4964,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:23:26","func_code":"def minimum(a):\n m = a[0]\n for n in a:\n if m > n:\n m = n\n return m","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":3534,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:23:26","func_code":"def minimum(a):\n m = a[0]\n for n in a:\n if m > n:\n m = n\n return m","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":24125,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 12:26:03","func_code":"def minimum(numbers):\n if len(numbers) == 1:\n return numbers[0]\n elif numbers[0] < numbers[1]:\n numbers.remove[numbers[1]]\n else:\n numbers.remove(numbers[0])\n return minimum(numbers)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":30078,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:27:01","func_code":"def maximum(a):\n m = a[0]\n for n in a:\n if m < n:\n m = n\n return m","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":18675,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:27:01","func_code":"def maximum(a):\n m = a[0]\n for n in a:\n if m < n:\n m = n\n return m","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":20714,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:27:59","func_code":"def minimum(a):\n a = sorted(a)\n return a[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":9577,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:28:20","func_code":"def minimum(a):\n a = sorted(a)\n return a[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":10547,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:28:20","func_code":"def minimum(a):\n a = sorted(a)\n return a[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":8689,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:29:13","func_code":"def minimum(collection, itera=0, mini=None):\n if itera == 0:\n mini = collection[0]\n if len(collection) == itera:\n return mini\n if mini > collection[itera]:\n mini = collection[itera]\n return minimum(collection, itera + 1, mini)\n else:\n return minimum(collection, itera + 1, mini)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":5252,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:29:13","func_code":"def minimum(collection, itera=0, mini=None):\n if itera == 0:\n mini = collection[0]\n if len(collection) == itera:\n return mini\n if mini > collection[itera]:\n mini = collection[itera]\n return minimum(collection, itera + 1, mini)\n else:\n return minimum(collection, itera + 1, mini)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":39585,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:29:26","func_code":"def minimum(l):\n return sorted(l)[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":28209,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:29:26","func_code":"def minimum(l):\n return sorted(l)[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":30050,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:30:09","func_code":"def maximum(collection, itera=0, mini=None):\n if itera == 0:\n mini = collection[0]\n if len(collection) == itera:\n return mini\n if mini < collection[itera]:\n mini = collection[itera]\n return minimum(collection, itera + 1, mini)\n else:\n return minimum(collection, itera + 1, mini)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":34661,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:30:36","func_code":"def maximum(collection, itera=0, mini=None):\n if itera == 0:\n mini = collection[0]\n if len(collection) == itera:\n return mini\n if mini < collection[itera]:\n mini = collection[itera]\n return minimum(collection, itera + 1, mini)\n else:\n return minimum(collection, itera + 1, mini)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":27315,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 12:30:38","func_code":"def minimum(numbers):\n if len(numbers) == 1:\n return numbers[0]\n if numbers[0] < numbers[1]:\n numbers.remove(numbers[1])\n else:\n numbers.remove(numbers[0])\n return minimum(numbers)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":40532,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 12:30:38","func_code":"def minimum(numbers):\n if len(numbers) == 1:\n return numbers[0]\n if numbers[0] < numbers[1]:\n numbers.remove(numbers[1])\n else:\n numbers.remove(numbers[0])\n return minimum(numbers)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":6485,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:30:52","func_code":"def maximum(collection, itera=0, mini=None):\n if itera == 0:\n mini = collection[0]\n if len(collection) == itera:\n return mini\n if mini < collection[itera]:\n mini = collection[itera]\n return maximum(collection, itera + 1, mini)\n else:\n return maximum(collection, itera + 1, mini)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":32175,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:30:52","func_code":"def maximum(collection, itera=0, mini=None):\n if itera == 0:\n mini = collection[0]\n if len(collection) == itera:\n return mini\n if mini < collection[itera]:\n mini = collection[itera]\n return maximum(collection, itera + 1, mini)\n else:\n return maximum(collection, itera + 1, mini)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":19608,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:30:54","func_code":"def maximum(a):\n a = sorted(a)\n return a[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":2697,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:30:54","func_code":"def maximum(a):\n a = sorted(a)\n return a[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":5712,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:31:07","func_code":"def maximum(l):\n return sorted(l)[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":14995,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:31:07","func_code":"def maximum(l):\n return sorted(l)[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":9933,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:32:16","func_code":"def count_letters(s):\n return len(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":39014,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:32:37","func_code":"def count_letters(s):\n return len(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":10882,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:32:37","func_code":"def count_letters(s):\n return len(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":25160,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 12:32:49","func_code":"def maximum(numbers):\n if len(numbers) == 1:\n return numbers[0]\n if numbers[0] > numbers[1]:\n numbers.remove(numbers[1])\n else:\n numbers.remove(numbers[0])\n return maximum(numbers)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":30747,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 12:32:49","func_code":"def maximum(numbers):\n if len(numbers) == 1:\n return numbers[0]\n if numbers[0] > numbers[1]:\n numbers.remove(numbers[1])\n else:\n numbers.remove(numbers[0])\n return maximum(numbers)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":7058,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-24 12:40:16","func_code":"def minimum(m=[]):\n i = 0\n a = m[i]\n while i < len(m):\n if a > m[i]:\n a = m[i]\n i += 1\n return a","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":37335,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-24 12:40:16","func_code":"def minimum(m=[]):\n i = 0\n a = m[i]\n while i < len(m):\n if a > m[i]:\n a = m[i]\n i += 1\n return a","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":39604,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-24 12:41:34","func_code":"def maximum(m=[]):\n i = 0\n a = m[i]\n while i < len(m):\n if a < m[i]:\n a = m[i]\n i += 1\n return a","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":24118,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-24 12:41:34","func_code":"def maximum(m=[]):\n i = 0\n a = m[i]\n while i < len(m):\n if a < m[i]:\n a = m[i]\n i += 1\n return a","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":24387,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-24 12:41:34","func_code":"def maximum(m=[]):\n i = 0\n a = m[i]\n while i < len(m):\n if a < m[i]:\n a = m[i]\n i += 1\n return a","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":10457,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:44:03","func_code":"def reverse_list(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - 1 - i]\n a[len(a) - 1 - i] = tmp\n i += 1\n return a","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":23927,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:44:03","func_code":"def reverse_list(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - 1 - i]\n a[len(a) - 1 - i] = tmp\n i += 1\n return a","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":26074,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:44:29","func_code":"def count_letters(inputed, counter=0):\n if inputed[:-1] == '':\n return counter\n if counter == 0:\n counter += 1\n return count_letters(inputed[:-1], counter + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":40270,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:44:29","func_code":"def count_letters(inputed, counter=0):\n if inputed[:-1] == '':\n return counter\n if counter == 0:\n counter += 1\n return count_letters(inputed[:-1], counter + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":36532,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 12:48:31","func_code":"def minimum(a):\n return min(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":26939,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:49:29","func_code":"def count_letters(s):\n i = 0\n for c in s:\n i += 1\n return i","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":5648,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:50:35","func_code":"def reverse_list(input_list, workinglist=[], new=True):\n if new:\n workinglist = []\n if len(input_list) == 0:\n return workinglist\n else:\n workinglist.append(input_list[-1])\n return reverse_list(input_list[:-1], workinglist, False)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":7991,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:50:35","func_code":"def reverse_list(input_list, workinglist=[], new=True):\n if new:\n workinglist = []\n if len(input_list) == 0:\n return workinglist\n else:\n workinglist.append(input_list[-1])\n return reverse_list(input_list[:-1], workinglist, False)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":5881,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:50:35","func_code":"def reverse_list(input_list, workinglist=[], new=True):\n if new:\n workinglist = []\n if len(input_list) == 0:\n return workinglist\n else:\n workinglist.append(input_list[-1])\n return reverse_list(input_list[:-1], workinglist, False)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":30512,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:56:41","func_code":"def count_letters(s):\n i = 0\n for c in s:\n i += 1\n return i","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":14483,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:56:41","func_code":"def count_letters(s):\n i = 0\n for c in s:\n i += 1\n return i","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":28813,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:56:53","func_code":"def reverse_list(a):\n m = a[::-1]\n return m","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":7888,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:56:53","func_code":"def reverse_list(a):\n m = a[::-1]\n return m","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":23563,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 12:58:02","func_code":"def fibonacci(n):\n if n <= 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":36873,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:58:17","func_code":"def count_letters(s):\n if s == '':\n return 0\n count = 0\n for c in s:\n count += 1\n return count","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":4051,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:58:17","func_code":"def count_letters(s):\n if s == '':\n return 0\n count = 0\n for c in s:\n count += 1\n return count","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":13982,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 12:58:26","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":41406,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 12:58:26","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":30765,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:01:38","func_code":"def minimum(a):\n if len(a) == 1:\n return a\n else:\n if a[0] < a[1]:\n del a[1]\n else:\n del a[0]\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":41914,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:01:52","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n else:\n if a[0] < a[1]:\n del a[1]\n else:\n del a[0]\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":40529,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:01:52","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n else:\n if a[0] < a[1]:\n del a[1]\n else:\n del a[0]\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":23795,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:02:49","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":23266,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:02:49","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":12415,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 13:03:16","func_code":"def reverse_list(l, s=None):\n if s == None:\n s = []\n if l == []:\n return s\n else:\n s.append(l[-1])\n l.remove(l[-1])\n return reverse_list(l, s)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":10630,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 13:03:16","func_code":"def reverse_list(l, s=None):\n if s == None:\n s = []\n if l == []:\n return s\n else:\n s.append(l[-1])\n l.remove(l[-1])\n return reverse_list(l, s)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":13271,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:03:36","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n else:\n if a[0] > a[1]:\n del a[1]\n else:\n del a[0]\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":36968,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:03:36","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n else:\n if a[0] > a[1]:\n del a[1]\n else:\n del a[0]\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":1206,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:07:36","func_code":"def count_letters(s):\n if not s:\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":31838,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:07:36","func_code":"def count_letters(s):\n if not s:\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":37030,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 13:08:56","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":1110,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 13:08:56","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":4844,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 13:08:56","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":41061,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 13:09:27","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":18185,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 13:09:27","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":29837,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:11:27","func_code":"def reverse_list(l):\n if l == []:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":3582,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:11:27","func_code":"def reverse_list(l):\n if l == []:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":14592,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:13:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":18900,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:14:20","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":34510,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:14:29","func_code":"def reverse_list(a):\n return reverse_list(a[1:]) + a[0]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":37463,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:15:41","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":38022,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:15:41","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":12191,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:16:38","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":28171,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:16:38","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":36132,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:17:49","func_code":"def reverse_list(a):\n return reverse_list(a[1:]) + [a[0]]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":37258,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:19:47","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":26602,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:21:05","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":30451,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:21:05","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21253,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 13:22:55","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n else:\n return [s[-1]] + reverse_list(s[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":6594,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 13:22:55","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n else:\n return [s[-1]] + reverse_list(s[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":15163,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:28:43","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":22130,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:28:43","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":22482,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:31:04","func_code":"def reverse_list(l, i=None):\n if i is None:\n i = len(l) - 1\n if i > 0:\n return reverse_list(l[1:] + [l[0]], i - 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":1586,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:32:53","func_code":"def reverse_list(l, i=None):\n if i is None:\n i = len(l) - 1\n if i >= 0:\n return reverse_list(l[1:] + [l[0]], i - 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":36074,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:33:10","func_code":"def reverse_list(l, i=None):\n if i is None:\n i = len(l)\n if i > 0:\n return reverse_list(l[1:] + [l[0]], i - 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":13396,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:33:38","func_code":"def reverse_list(l, i=None):\n if i is None:\n i = len(l) \/\/ 2\n if i > 0:\n return reverse_list(l[1:] + [l[0]], i - 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":10936,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:33:55","func_code":"def reverse_list(l, i=None):\n if i is None:\n i = len(l) \/\/ 2\n if i >= 0:\n return reverse_list(l[1:] + [l[0]], i - 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":23727,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 13:34:42","func_code":"def count_letters(s):\n if s == ' ':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":3972,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:34:48","func_code":"def selectionsort(A):\n i = 0\n while i < len(A) - 1:\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25531,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:34:48","func_code":"def selectionsort(A):\n i = 0\n while i < len(A) - 1:\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41460,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:34:48","func_code":"def selectionsort(A):\n i = 0\n while i < len(A) - 1:\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":11961,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 13:36:05","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":22881,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 13:36:05","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":6634,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:48:04","func_code":"def reverse_list(l, i=0):\n if i < len(l) \/\/ 2:\n l[i], l[-i - 1] = l[-i - 1], l[i]\n return reverse_list(l, i + 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":22971,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:48:04","func_code":"def reverse_list(l, i=0):\n if i < len(l) \/\/ 2:\n l[i], l[-i - 1] = l[-i - 1], l[i]\n return reverse_list(l, i + 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":2432,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 13:53:56","func_code":"def lowest(first, rest):\n if len(rest) == 0:\n return first\n if first > rest[0] or first < 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n\n\ndef minimum(l):\n\n def lowest(first, rest):\n if len(rest) == 0:\n return first\n if first > rest[0] or first < 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n return lowest(l[0], l[1:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":33596,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 13:54:20","func_code":"def lowest(first, rest):\n if len(rest) == 0:\n return first\n if first > rest[0] or first <= 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n\n\ndef minimum(l):\n\n def lowest(first, rest):\n if len(rest) == 0:\n return first\n if first > rest[0] or first <= 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n return lowest(l[0], l[1:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":9523,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 13:55:41","func_code":"def lowest(first, rest):\n if len(rest) == 0:\n return first\n if first > rest[0] or first < 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n\n\ndef minimum(l=None):\n if l == None:\n l = []\n\n def lowest(first, rest):\n if len(rest) == 0:\n return first\n if first > rest[0] or first < 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n return lowest(l[0], l[1:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":17011,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 13:56:16","func_code":"def lowest(first, rest):\n if len(rest) == 0:\n return first\n elif first > rest[0] or first < 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n\n\ndef minimum(l=None):\n if l == None:\n l = []\n\n def lowest(first, rest):\n if len(rest) == 0:\n return first\n elif first > rest[0] or first < 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n return lowest(l[0], l[1:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":33215,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:02:48","func_code":"def selectionsort(a):\n i = 0\n p = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":428,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:02:48","func_code":"def selectionsort(a):\n i = 0\n p = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17206,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:07:08","func_code":"def minimum(l, current_min=None):\n if not l:\n return current_min\n first = l.pop()\n if current_min == None or first < current_min:\n return minimum(l, first)\n return minimum(l, current_min)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":40564,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:07:08","func_code":"def minimum(l, current_min=None):\n if not l:\n return current_min\n first = l.pop()\n if current_min == None or first < current_min:\n return minimum(l, first)\n return minimum(l, current_min)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":27397,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:09:37","func_code":"def maximum(l, current_max=None):\n if not l:\n return current_max\n first = l.pop()\n if current_max == None or first > current_max:\n return maximum(l, first)\n return maximum(l, current_max)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":42232,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:09:37","func_code":"def maximum(l, current_max=None):\n if not l:\n return current_max\n first = l.pop()\n if current_max == None or first > current_max:\n return maximum(l, first)\n return maximum(l, current_max)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":31602,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:17:14","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":7756,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:17:36","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":38598,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:17:36","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":1266,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:22:27","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":29995,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:22:52","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":32690,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:23:13","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":26316,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:23:53","func_code":"def reverse_list(l):\n if l == []:\n return l\n return l[-1:] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":19871,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:23:53","func_code":"def reverse_list(l):\n if l == []:\n return l\n return l[-1:] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":21968,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:24:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":17798,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:25:01","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":25061,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:26:14","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n print(0)\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":17707,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:26:42","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return None\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":31034,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:26:56","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return 1\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":37642,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:27:55","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":7515,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:27:55","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":32077,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:29:59","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":22560,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:29:59","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":30224,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:30:01","func_code":"def reverse_list(a):\n if len(a) == 1:\n return []\n else:\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":8615,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:30:12","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":29631,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:31:16","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":24725,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:31:16","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":29678,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:31:23","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n else:\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":10903,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:31:23","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n else:\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":19373,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:32:46","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":34341,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:33:06","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":2037,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:33:12","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":12119,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:33:48","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":5792,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 14:38:46","func_code":"def minimum(s):\n if len(s) == 1:\n return 0\n else:\n max = maxElement(L[1:])\n if L[0] > max:\n return L[0]\n else:\n return max","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":35531,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:41:22","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":25268,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:41:22","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":11691,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:41:25","func_code":"def count_letters(s):\n if s == ' ':\n return 0\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":16142,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 14:41:55","func_code":"def minimum(s):\n if n == 1:\n return s[0]\n else:\n min = minimum(s[1:], n - 1)\n if s[0] < min:\n return s[0]\n else:\n return min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":11515,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 14:42:12","func_code":"def minimum(s):\n if s == 1:\n return s[0]\n else:\n min = minimum(s[1:], s - 1)\n if s[0] < min:\n return s[0]\n else:\n return min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":18759,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:42:31","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":21137,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:42:31","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":20747,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:42:31","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":9467,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:42:50","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":30194,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:42:50","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":6237,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:46:40","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n j = i + 1\n while j < len(A):\n if A[j] < A[i]:\n A[j], A[i] = A[i], A[j]\n j += 1\n i += 1\n return A","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":11614,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:46:40","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n j = i + 1\n while j < len(A):\n if A[j] < A[i]:\n A[j], A[i] = A[i], A[j]\n j += 1\n i += 1\n return A","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":6143,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:46:40","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n j = i + 1\n while j < len(A):\n if A[j] < A[i]:\n A[j], A[i] = A[i], A[j]\n j += 1\n i += 1\n return A","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":5346,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 14:48:56","func_code":"def minimum(s):\n if len(s) == 0:\n return 0\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":11894,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 14:49:15","func_code":"def minimum(s):\n if len(s) == 0:\n return 0\n else:\n min_ret = minimum(s[1:])\n return s[0] if s[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":32111,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 14:49:43","func_code":"def minimum(s):\n if len(s) == 1:\n return 0\n else:\n min_ret = minimum(s[1:])\n return s[0] if s[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":1304,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:50:02","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":39648,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:50:02","func_code":"def reverse_list(a):\n m = a[::-1]\n return m","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":24277,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:50:02","func_code":"def reverse_list(a):\n m = a[::-1]\n return m","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":23352,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:54:04","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n return A\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":1058,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:54:23","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1\n return A","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":15098,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:54:32","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fobonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":13291,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:54:49","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":19812,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:54:52","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":24593,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:54:52","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":14801,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:56:32","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":22658,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:56:32","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17532,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:01:21","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":39181,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:03:04","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":5060,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:03:04","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":29868,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:04:54","func_code":"def minimum(s):\n if len(s) == 1:\n return s[0]\n else:\n min_ret = minimum(s[1:])\n return s[0] if s[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":3979,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:04:54","func_code":"def minimum(s):\n if len(s) == 1:\n return s[0]\n else:\n min_ret = minimum(s[1:])\n return s[0] if s[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":18287,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:05:56","func_code":"def quicksort(A, p, r):\n print(len(A))","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":20972,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:10:03","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, r - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":11154,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 15:10:04","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":23455,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 15:10:04","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":38263,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 15:10:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":36358,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 15:10:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":7678,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:10:43","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":37025,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:14:05","func_code":"def minimum(a):\n a_sorted = sorted(a)\n return a","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":25336,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:14:28","func_code":"def minimum(a):\n return sorted(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":3623,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:14:42","func_code":"def minimum(a):\n return sorted(a)[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":19197,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:14:42","func_code":"def minimum(a):\n return sorted(a)[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":40691,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:15:27","func_code":"def maximum(a):\n return sorted(a)[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":23998,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:15:27","func_code":"def maximum(a):\n return sorted(a)[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":32665,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:16:17","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":34985,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:16:31","func_code":"def count_letters(s):\n return len(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":23332,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:18:02","func_code":"def count_letters(s):\n total = 0\n for x in s:\n total += 1\n return total","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":22928,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:18:02","func_code":"def count_letters(s):\n total = 0\n for x in s:\n total += 1\n return total","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":38280,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:19:03","func_code":"def reverse_list(a):\n return a[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":9968,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:19:03","func_code":"def reverse_list(a):\n return a[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":8130,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:19:18","func_code":"def maximum(s):\n if len(s) == 1:\n return s[0]\n else:\n maxi = maximum(s[1:])\n return l[0] if l[0] > maxi else maxi","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":5612,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:19:32","func_code":"def maximum(s):\n if len(s) == 1:\n return s[0]\n else:\n maxi = maximum(s[1:])\n return s[0] if s[0] > maxi else maxi","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":23447,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:19:32","func_code":"def maximum(s):\n if len(s) == 1:\n return s[0]\n else:\n maxi = maximum(s[1:])\n return s[0] if s[0] > maxi else maxi","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":12267,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:22:40","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":18176,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:23:13","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":20508,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:23:13","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":32212,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:25:36","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":19639,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:27:36","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":40945,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:27:36","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":6269,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:28:44","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":2346,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:28:44","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":3239,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:28:48","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":38647,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:28:48","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":27060,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:28:48","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":4156,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:29:43","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":31068,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:29:43","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":12915,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:31:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":39923,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:31:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14189,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:53:39","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":14936,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:53:39","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":6589,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:55:10","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":37438,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:55:10","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":12531,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:55:10","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":19175,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 15:56:56","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n minv = minimum(l[1:])\n return l[0] if l[0] < minv else minv","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":29466,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 15:56:56","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n minv = minimum(l[1:])\n return l[0] if l[0] < minv else minv","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":7265,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 15:59:34","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n maxv = maximum(l[1:])\n return l[0] if l[0] > maxv else maxv","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":41145,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 15:59:34","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n maxv = maximum(l[1:])\n return l[0] if l[0] > maxv else maxv","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":14860,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:01:47","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":7570,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:01:47","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":40503,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-24 16:05:33","func_code":"def selectionsort(l):\n i = 0\n while i < len(l):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":15496,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:06:02","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return l[-1].append(reverse_list(s[:-1]))","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":5347,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-24 16:06:16","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38539,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-24 16:06:16","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":206,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-24 16:06:16","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":16959,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:06:20","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]].append(reverse_list(s[:-1]))","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":1768,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:06:34","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]].append(reverse_list(l[:-1]))","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":26379,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:07:10","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":31476,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:07:10","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":19693,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:10:19","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":2729,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:10:19","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":39135,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:22:18","func_code":"def minimum(ints):\n if len(ints) == 1:\n return ints[0]\n elif ints[0] > ints[1]:\n ints.remove(ints[0])\n else:\n ints.remove(ints[1])\n return minimum(ints)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":19153,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:23:38","func_code":"def minimum(ints):\n if len(ints) == 1:\n return ints[0]\n elif ints[0] > ints[1]:\n ints.remove(ints[0])\n else:\n ints.remove(ints[1])\n return minimum(ints)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":24521,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:23:38","func_code":"def minimum(ints):\n if len(ints) == 1:\n return ints[0]\n elif ints[0] > ints[1]:\n ints.remove(ints[0])\n else:\n ints.remove(ints[1])\n return minimum(ints)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":16280,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:23:42","func_code":"def maximum(ints):\n if len(ints) == 1:\n return ints[0]\n elif ints[0] < ints[1]:\n ints.remove(ints[0])\n else:\n ints.remove(ints[1])\n return maximum(ints)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":35482,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:23:42","func_code":"def maximum(ints):\n if len(ints) == 1:\n return ints[0]\n elif ints[0] < ints[1]:\n ints.remove(ints[0])\n else:\n ints.remove(ints[1])\n return maximum(ints)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":20932,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:26:06","func_code":"def count_letters(string, count=0):\n if string == '':\n return count\n else:\n string = string[1:]\n return count_letters(string, count + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":17269,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:26:06","func_code":"def count_letters(string, count=0):\n if string == '':\n return count\n else:\n string = string[1:]\n return count_letters(string, count + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":25043,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:28:41","func_code":"def reverse_list(l, reverse=None):\n if reverse is None:\n reverse = []\n if not l:\n return reverse\n else:\n reverse.append(l[-1])\n l.remove(l[-1])\n return reverse_list(l, reverse)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":35334,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:28:41","func_code":"def reverse_list(l, reverse=None):\n if reverse is None:\n reverse = []\n if not l:\n return reverse\n else:\n reverse.append(l[-1])\n l.remove(l[-1])\n return reverse_list(l, reverse)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":5143,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:30:53","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":8813,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:32:32","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] < a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":8879,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:33:53","func_code":"def selectionsort(a):\n for done in range(len(a) - 1):\n min_value = a[done]\n min_index = done\n for i in range(done + 1, len(a)):\n if a[i] < min_value:\n min_value = a[i]\n min_index = i\n a[min_index], a[done] = a[done], a[min_index]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35556,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:33:53","func_code":"def selectionsort(a):\n for done in range(len(a) - 1):\n min_value = a[done]\n min_index = done\n for i in range(done + 1, len(a)):\n if a[i] < min_value:\n min_value = a[i]\n min_index = i\n a[min_index], a[done] = a[done], a[min_index]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":24783,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:39:45","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":18703,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:39:45","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":35298,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:43:14","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":7373,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:44:06","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":40785,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:44:06","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5455,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:25:09","func_code":"def minimum(l, c=None):\n if c == None:\n return minimum(l[1:], l[0])\n if l == []:\n return c\n if l[0] < c:\n return minimum(l[1:], l[0])\n else:\n return minimum(l[1:], c)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":17266,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:25:09","func_code":"def minimum(l, c=None):\n if c == None:\n return minimum(l[1:], l[0])\n if l == []:\n return c\n if l[0] < c:\n return minimum(l[1:], l[0])\n else:\n return minimum(l[1:], c)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":33238,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:25:49","func_code":"def maximum(l, c=None):\n if c == None:\n return minimum(l[1:], l[0])\n if l == []:\n return c\n if l[0] > c:\n return minimum(l[1:], l[0])\n else:\n return minimum(l[1:], c)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":41840,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:26:38","func_code":"def maximum(l, c=None):\n if c == None:\n return maximum(l[1:], l[0])\n if l == []:\n return c\n if l[0] > c:\n return maximum(l[1:], l[0])\n else:\n return maximum(l[1:], c)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":7101,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:26:38","func_code":"def maximum(l, c=None):\n if c == None:\n return maximum(l[1:], l[0])\n if l == []:\n return c\n if l[0] > c:\n return maximum(l[1:], l[0])\n else:\n return maximum(l[1:], c)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":20170,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:35:15","func_code":"def count_letters(word, current=0):\n if word == '':\n return current\n return count_letters(word[1:], current=current + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":27988,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:35:15","func_code":"def count_letters(word, current=0):\n if word == '':\n return current\n return count_letters(word[1:], current=current + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":23784,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:40:35","func_code":"def reverse_list(l, n=None):\n if l == []:\n return n\n if n == None:\n return reverse_list(l[:-1], [l[-1]])\n return reverse_list(l[:-1], n + [l[-1]])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":34217,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:43:34","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":17838,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:43:34","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":18526,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:43:34","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":22520,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:46:25","func_code":"def minimum(l):\n a = l[len(l)]\n if len(a) == 1:\n return l[0]\n if a >= minimum(l):\n return minimum([j for j in l[:-1]])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":16495,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:46:42","func_code":"def minimum(l):\n a = l[len(l) - 1]\n if len(a) == 1:\n return l[0]\n if a >= minimum(l):\n return minimum([j for j in l[:-1]])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":39828,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:47:04","func_code":"def minimum(l):\n a = l[len(l) - 1]\n if len(l) == 1:\n return l[0]\n if a >= minimum(l):\n return minimum([j for j in l[:-1]])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":34587,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:53:29","func_code":"def minimum(l):\n a = l[len(l) - 1]\n if len(l) == 1:\n return l[0]\n if a >= minimum(l[:-1]):\n return minimum(l[-1])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":17575,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:55:16","func_code":"def minimum(l):\n a = l[0]\n if len(l) == 1:\n return l[0]\n if a >= minimum(l[:-1]):\n return minimum(l[:-1])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":33566,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:56:35","func_code":"def minimum(l):\n a = l[0]\n if len(l) == 2:\n if l[1] >= l[0]:\n return l[0]\n else:\n return l[1]\n if a >= minimum(l[:-1]):\n return minimum(l[:-1])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":1533,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:58:29","func_code":"def minimum(l):\n a = l[0]\n if len(l) == 1:\n return l[0]\n elif a >= minimum(l):\n return minimum(l[:-1])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":21491,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:03:01","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n for i in l:\n if i >= minimum(l[1:]):\n return minimum(l[1:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":2489,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:06:44","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if minimum(l[:-1]) >= minimum(l[1:]):\n return minimum(l[1:])\n else:\n return minimum(l[:-1])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":29107,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:06:44","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if minimum(l[:-1]) >= minimum(l[1:]):\n return minimum(l[1:])\n else:\n return minimum(l[:-1])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":34998,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:08:40","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if maximum(l[:-1]) >= maximum(l[1:]):\n return maximum(l[:-1])\n else:\n return maximum(l[1:])","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":10506,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:08:40","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if maximum(l[:-1]) >= maximum(l[1:]):\n return maximum(l[:-1])\n else:\n return maximum(l[1:])","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":36598,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:14:36","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":37664,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:14:36","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":29779,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:18:53","func_code":"def reverse_list(l):\n if len(l) == 2:\n return l[1] + l[0]\n else:\n return reverse_list(l[1:]) + l[0]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":26465,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:20:11","func_code":"def reverse_list(l):\n if len(l) == 2:\n return list(''.join(l[1], l[0]))\n else:\n return list(''.join(reverse_list(l[1:]), l[0]))","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":7850,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:21:57","func_code":"def reverse_list(l):\n if len(l) == 2:\n return ''.join(l[1], l[0]).split()\n else:\n return ''.join(reverse_list(l[1]), l[0]).split()","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":7445,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:23:04","func_code":"def reverse_list(l):\n if len(l) == 2:\n return ' '.join(l[1], l[0]).split(' ')\n else:\n return ''.join(reverse_list(l[1]), l[0]).split()","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":12588,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:24:54","func_code":"def reverse_list(l):\n if len(l) == 2:\n return l[1].append(l[0])\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":39444,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:26:26","func_code":"def reverse_list(l):\n if len(l) == 2:\n a = []\n a.append(l[1])\n a.append(l[0])\n return a\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":37201,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:29:29","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return reverse_list(l).append(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":12539,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:29:53","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return reverse_list(l).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":5472,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:30:46","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":32541,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:31:39","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":4072,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:32:06","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n elif len(l) == 1:\n return l[0]\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":39489,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:32:55","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n elif len(l) == 1:\n return reverse_list(l[1:]).append(l[0])\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":26111,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:04:16","func_code":"def fibonacci(n):\n if n == 1 or n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":627,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:04:57","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":22466,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:04:57","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":33540,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:32:55","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[p] >= a[j]:\n p = j\n j += 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":39907,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:32:55","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[p] >= a[j]:\n p = j\n j += 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23810,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:35:34","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":32011,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:39:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":39492,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:39:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":6092,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:39:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":2112,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:49:32","func_code":"def minimum(list_1):\n i = 0\n total = '1000000'\n while i < len(list_1):\n if int(list_1[i]) <= int(total):\n total = list_1[i]\n else:\n 0\n i = i + 1\n return total","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":33468,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:49:32","func_code":"def minimum(list_1):\n i = 0\n total = '1000000'\n while i < len(list_1):\n if int(list_1[i]) <= int(total):\n total = list_1[i]\n else:\n 0\n i = i + 1\n return total","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":17233,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:51:31","func_code":"def maximum(list_1):\n i = 0\n total = 0\n while i < len(list_1):\n if int(list_1[i]) >= int(total):\n total = list_1[i]\n else:\n 0\n i = i + 1\n return total","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":8798,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:51:31","func_code":"def maximum(list_1):\n i = 0\n total = 0\n while i < len(list_1):\n if int(list_1[i]) >= int(total):\n total = list_1[i]\n else:\n 0\n i = i + 1\n return total","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":1934,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:53:19","func_code":"def count_letters(string):\n return len(string)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":11457,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:53:19","func_code":"def count_letters(string):\n return len(string)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":27700,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:56:39","func_code":"def reverse_list(list_1):\n return list_1[::1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":9266,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:57:13","func_code":"def reverse_list(list_1):\n return list_1[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":18477,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:57:13","func_code":"def reverse_list(list_1):\n return list_1[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":27762,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:16:40","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":12322,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:16:40","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":6358,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:31:42","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":30635,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:31:42","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":34143,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 21:35:42","func_code":"def fibonacci(pos):\n import sys\n prev = 0\n curr = 1\n i = 0\n if pos == 0:\n return 1\n else:\n while i < pos + 1:\n curr = prev + curr\n prev = curr - prev\n i = i + 1\n return prev","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":3055,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 21:35:42","func_code":"def fibonacci(pos):\n import sys\n prev = 0\n curr = 1\n i = 0\n if pos == 0:\n return 1\n else:\n while i < pos + 1:\n curr = prev + curr\n prev = curr - prev\n i = i + 1\n return prev","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":24680,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:43:20","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":11289,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:43:20","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28541,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:43:20","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35415,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 21:50:10","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] < a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":32784,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 21:50:10","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] < a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":32581,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 21:50:21","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":22432,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 21:50:21","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":42311,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 22:18:25","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":19546,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 22:18:25","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":40725,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:26:59","func_code":"def minimum(m):\n if len(m) == 1:\n return m[0]\n else:\n a = m.pop()\n b = m.pop()\n if a < b:\n m.append(a)\n else:\n m.append(b)\n return minimum(m)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":8993,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:26:59","func_code":"def minimum(m):\n if len(m) == 1:\n return m[0]\n else:\n a = m.pop()\n b = m.pop()\n if a < b:\n m.append(a)\n else:\n m.append(b)\n return minimum(m)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":325,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:28:32","func_code":"def maximum(m):\n if len(m) == 1:\n return m[0]\n else:\n a = m.pop()\n b = m.pop()\n if a > b:\n m.append(a)\n else:\n m.append(b)\n return maximum(m)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":10185,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:28:32","func_code":"def maximum(m):\n if len(m) == 1:\n return m[0]\n else:\n a = m.pop()\n b = m.pop()\n if a > b:\n m.append(a)\n else:\n m.append(b)\n return maximum(m)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":10622,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:50:50","func_code":"def reverse_list(m):\n if len(m) == 1:\n return m\n else:\n return [m.pop()] + reverse_list(m)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":15920,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:52:06","func_code":"def reverse_list(m):\n if len(m) == 0:\n return m\n else:\n return [m.pop()] + reverse_list(m)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":37101,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:52:06","func_code":"def reverse_list(m):\n if len(m) == 0:\n return m\n else:\n return [m.pop()] + reverse_list(m)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":8472,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:52:06","func_code":"def reverse_list(m):\n if len(m) == 0:\n return m\n else:\n return [m.pop()] + reverse_list(m)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":39677,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 23:05:26","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n position = i\n j = i + 1\n while j < len(n):\n if n[j] < n[position]:\n position = j\n j = j + 1\n val = n[position]\n n[position] = n[i]\n n[i] = val\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":31396,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 23:05:26","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n position = i\n j = i + 1\n while j < len(n):\n if n[j] < n[position]:\n position = j\n j = j + 1\n val = n[position]\n n[position] = n[i]\n n[i] = val\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17708,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 23:05:26","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n position = i\n j = i + 1\n while j < len(n):\n if n[j] < n[position]:\n position = j\n j = j + 1\n val = n[position]\n n[position] = n[i]\n n[i] = val\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":7384,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-24 23:57:33","func_code":"def minimum(value):\n if len(value) == 1:\n return value[0]\n if value[0] < value[1]:\n value.remove(value[1])\n return minimum(value)\n else:\n value.remove(value[0])\n return minimum(value)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":25889,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-24 23:57:33","func_code":"def minimum(value):\n if len(value) == 1:\n return value[0]\n if value[0] < value[1]:\n value.remove(value[1])\n return minimum(value)\n else:\n value.remove(value[0])\n return minimum(value)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":897,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-24 23:57:33","func_code":"def minimum(value):\n if len(value) == 1:\n return value[0]\n if value[0] < value[1]:\n value.remove(value[1])\n return minimum(value)\n else:\n value.remove(value[0])\n return minimum(value)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":4595,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:00:06","func_code":"def maximum(number):\n if len(number) == 1:\n return number[0]\n if number[0] > number[1]:\n number.remove(number[1])\n return maximum(number)\n else:\n number.remove(number[0])\n return maximum(number)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":5849,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:00:06","func_code":"def maximum(number):\n if len(number) == 1:\n return number[0]\n if number[0] > number[1]:\n number.remove(number[1])\n return maximum(number)\n else:\n number.remove(number[0])\n return maximum(number)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":15422,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:06:03","func_code":"def count_letters(s):\n number = 0\n if not s:\n return 0\n else:\n number += 1\n return number + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":37277,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:06:03","func_code":"def count_letters(s):\n number = 0\n if not s:\n return 0\n else:\n number += 1\n return number + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":41057,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-25 00:29:27","func_code":"def quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)\n\n\ndef minimum(a):\n quicksort(a, 0, len(a) - 1)\n return a[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":3249,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-25 00:29:27","func_code":"def quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)\n\n\ndef minimum(a):\n quicksort(a, 0, len(a) - 1)\n return a[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":41175,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:29:44","func_code":"def reverse_list(value):\n if len(value) == 0:\n return []\n return [value[-1]] + reverse_list(value[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":25872,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:29:44","func_code":"def reverse_list(value):\n if len(value) == 0:\n return []\n return [value[-1]] + reverse_list(value[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":24175,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-25 00:30:30","func_code":"def quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)\n\n\ndef maximum(a):\n quicksort(a, 0, len(a) - 1)\n return a[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":13521,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-25 00:30:30","func_code":"def quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)\n\n\ndef maximum(a):\n quicksort(a, 0, len(a) - 1)\n return a[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":20652,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-25 00:34:12","func_code":"def count_letters(s):\n if s == '':\n return 0\n return count_letters(s[:-1]) + 1","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":32110,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-25 00:34:12","func_code":"def count_letters(s):\n if s == '':\n return 0\n return count_letters(s[:-1]) + 1","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":30612,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:46:05","func_code":"def fibonacci(value):\n if value == 1 or value == 0:\n return 1\n return fibonacci(value - 1) + fibonacci(value - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":33592,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:46:05","func_code":"def fibonacci(value):\n if value == 1 or value == 0:\n return 1\n return fibonacci(value - 1) + fibonacci(value - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":22355,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 01:09:17","func_code":"def sort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = sort(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":4118,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 01:09:17","func_code":"def sort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = sort(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":4928,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 01:09:17","func_code":"def sort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = sort(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":8523,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-25 10:28:19","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":4890,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-25 10:29:13","func_code":"def fibonacci(n):\n if n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":21477,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-25 10:29:13","func_code":"def fibonacci(n):\n if n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":10502,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:36:52","func_code":"def count_letters(a):\n return len(a)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":36221,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:36:52","func_code":"def count_letters(a):\n return len(a)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":25696,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:43:10","func_code":"def reverse_list(a):\n return a[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":26238,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:43:10","func_code":"def reverse_list(a):\n return a[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":7671,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:49:21","func_code":"def fibonacci(a):\n prev = 1\n curr = 1\n tmp = 0\n i = 0\n for i in range(0, a):\n tmp = curr\n curr = prev + curr\n prev = tmp","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":33882,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:49:47","func_code":"def fibonacci(a):\n prev = 1\n curr = 1\n tmp = 0\n i = 0\n for i in range(0, a):\n tmp = curr\n curr = prev + curr\n prev = tmp\n return curr","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":7655,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:50:02","func_code":"def fibonacci(a):\n prev = 1\n curr = 1\n tmp = 0\n i = 0\n for i in range(0, a):\n tmp = curr\n curr = prev + curr\n prev = tmp\n return prev","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":25437,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:50:30","func_code":"def fibonacci(a):\n prev = 1\n curr = 1\n for i in range(0, a):\n tmp = curr\n curr = prev + curr\n prev = tmp\n return prev","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":35852,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:50:30","func_code":"def fibonacci(a):\n prev = 1\n curr = 1\n for i in range(0, a):\n tmp = curr\n curr = prev + curr\n prev = tmp\n return prev","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":10408,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:53:47","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":35093,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:53:47","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":12331,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 11:01:10","func_code":"def selectionsort(a):\n for i in range(0, len(a)):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":24706,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 11:01:10","func_code":"def selectionsort(a):\n for i in range(0, len(a)):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":40518,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 11:09:59","func_code":"def count_letters(m):\n if m == '':\n return 0\n else:\n return 1 + count_letters(m[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":3415,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 11:09:59","func_code":"def count_letters(m):\n if m == '':\n return 0\n else:\n return 1 + count_letters(m[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":3178,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 11:17:20","func_code":"def reverse_list(m):\n if len(m) == 0:\n return []\n else:\n return [m[-1]] + reverse_list(m[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":38531,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 11:17:20","func_code":"def reverse_list(m):\n if len(m) == 0:\n return []\n else:\n return [m[-1]] + reverse_list(m[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":3994,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 11:23:10","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":242,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 11:23:10","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":41522,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:15:29","func_code":"def minimum(n):\n if n == 0:\n return 0\n i = 1\n p = 0\n while i < len(n):\n if n[i] < n[p]:\n n[p] = n[i]\n i = i + 1\n return n[p]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":22936,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:17:52","func_code":"def minimum(n):\n if len(n) == 1:\n return l[0]\n else:\n minr = minimum(n[1:])\n return n[0] if n[0] < minr else minr","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":38890,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:18:12","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n else:\n minr = minimum(n[1:])\n return n[0] if n[0] < minr else minr","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":22275,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:18:12","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n else:\n minr = minimum(n[1:])\n return n[0] if n[0] < minr else minr","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":28783,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:33:17","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n maxr = maxi(n[1:])\n return n[0] if n[0] > maxr else minr","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":27080,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:33:53","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n maxr = maximum(n[1:])\n return n[0] if n[0] > maxr else minr","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":34159,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:34:18","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n maxr = maximum(n[1:])\n return n[0] if n[0] > maxr else maxr","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":8682,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:34:18","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n maxr = maximum(n[1:])\n return n[0] if n[0] > maxr else maxr","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":41111,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:35:33","func_code":"def minimum(l):\n l = sorted(l)\n return l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":26835,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:35:33","func_code":"def minimum(l):\n l = sorted(l)\n return l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":12823,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:36:40","func_code":"def maximum(l):\n l = sorted(l)\n return l[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":2925,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:36:40","func_code":"def maximum(l):\n l = sorted(l)\n return l[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":27211,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:38:44","func_code":"def count_letters(string_):\n len(string_)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":37580,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:39:03","func_code":"def count_letters(n):\n if len(n) == 1:\n return n[0]\n length = len(n)\n return length","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":2907,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:39:31","func_code":"def count_letters(string_):\n counter = 0\n for i in string:\n counter += 1\n return counter","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":12958,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:39:45","func_code":"def count_letters(string_):\n counter = 0\n for i in string_:\n counter += 1\n return counter","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":4824,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:39:45","func_code":"def count_letters(string_):\n counter = 0\n for i in string_:\n counter += 1\n return counter","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":37419,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:41:16","func_code":"def count_letters(n):\n if len(n) == 1:\n return n[0]\n return 1 + count_letters(n[0:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":40072,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:41:46","func_code":"def count_letters(n):\n if len(n) == 1:\n return n[0]\n return 1 + count_letters(n[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":24037,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:41:46","func_code":"def count_letters(n):\n if len(n) == 1:\n return n[0]\n return 1 + count_letters(n[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":18164,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:41:46","func_code":"def count_letters(n):\n if len(n) == 1:\n return n[0]\n return 1 + count_letters(n[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":7163,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:48:28","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n else:\n return min(a[0], minimum(a[1:]))","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":21912,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:48:28","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n else:\n return min(a[0], minimum(a[1:]))","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":4891,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:54:05","func_code":"def maximum(list):\n if len(list) == 1:\n return list[0]\n else:\n m = maximum(list[1:])\n return m if m > list[0] else list[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":10053,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:54:05","func_code":"def maximum(list):\n if len(list) == 1:\n return list[0]\n else:\n m = maximum(list[1:])\n return m if m > list[0] else list[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":5359,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:56:14","func_code":"def count_letters(s):\n if not s:\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":14805,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:56:14","func_code":"def count_letters(s):\n if not s:\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":22202,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 13:01:47","func_code":"def reverse_list(l):\n reversedlist = []\n i = len(l) - 1\n while i > -1:\n reversedlist.append(l[i])\n i = i - 1\n return reversedlist","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":13688,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 13:01:47","func_code":"def reverse_list(l):\n reversedlist = []\n i = len(l) - 1\n while i > -1:\n reversedlist.append(l[i])\n i = i - 1\n return reversedlist","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":22142,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 13:01:47","func_code":"def reverse_list(l):\n reversedlist = []\n i = len(l) - 1\n while i > -1:\n reversedlist.append(l[i])\n i = i - 1\n return reversedlist","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":32560,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 13:08:19","func_code":"def reverse_list(l):\n if l == []:\n return []\n tmp = reverse_list(l[1:])\n tmp.append(l[0])\n return tmp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":3506,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 13:08:19","func_code":"def reverse_list(l):\n if l == []:\n return []\n tmp = reverse_list(l[1:])\n tmp.append(l[0])\n return tmp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":29904,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 13:14:38","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":1426,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 13:14:38","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":34011,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 13:21:43","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":30822,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 13:21:43","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":2954,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 14:58:14","func_code":"def minimum(a):\n lowest = sum(a)\n for e in a:\n if e < lowest:\n lowest = e\n return lowest","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":34777,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 14:58:14","func_code":"def minimum(a):\n lowest = sum(a)\n for e in a:\n if e < lowest:\n lowest = e\n return lowest","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":33418,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:01:11","func_code":"def maximum(a):\n highest = 0\n for e in a:\n if e > highest:\n highest = e\n return highest","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":17143,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:01:11","func_code":"def maximum(a):\n highest = 0\n for e in a:\n if e > highest:\n highest = e\n return highest","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":28979,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:03:33","func_code":"def count_letters(s):\n l = 0\n for e in s:\n l += 1\n return l","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":15535,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:03:33","func_code":"def count_letters(s):\n l = 0\n for e in s:\n l += 1\n return l","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":41352,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:14:30","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":22628,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:14:30","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":15195,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:14:38","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":17566,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:14:38","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":12844,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:14:54","func_code":"def maximum(s):\n if len(s) == 1:\n return s[0]\n else:\n maxi = maximum(s[1:])\n return s[0] if s[0] > maxi else maxi","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":6413,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:14:54","func_code":"def maximum(s):\n if len(s) == 1:\n return s[0]\n else:\n maxi = maximum(s[1:])\n return s[0] if s[0] > maxi else maxi","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":17129,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:16:20","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n else:\n return [s[-1]] + reverse_list(s[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":27071,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:16:20","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n else:\n return [s[-1]] + reverse_list(s[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":9743,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:22:39","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":20319,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:22:39","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":26220,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:28:05","func_code":"def selectionsort(m):\n for i in range(len(m)):\n n = i\n for j in range(i, len(m)):\n if m[j] < m[n]:\n n = j\n m[i], m[n] = m[n], m[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":11123,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:28:38","func_code":"def selectionsort(m):\n for i in range(len(m)):\n min_j = i\n for j in range(i, len(m)):\n if m[j] < m[min_j]:\n min_j = j\n m[i], m[min_j] = m[min_j], m[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20350,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:29:24","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum()","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":14628,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:29:49","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":7325,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:29:49","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":9963,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:29:52","func_code":"def selectionsort(m):\n for i in range(len(m)):\n n = i\n for j in range(i, len(m)):\n if m[j] < m[n]:\n n = j\n m[i], m[n] = m[n], m[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":40807,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:29:52","func_code":"def selectionsort(m):\n for i in range(len(m)):\n n = i\n for j in range(i, len(m)):\n if m[j] < m[n]:\n n = j\n m[i], m[n] = m[n], m[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":34059,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:29:52","func_code":"def selectionsort(m):\n for i in range(len(m)):\n n = i\n for j in range(i, len(m)):\n if m[j] < m[n]:\n n = j\n m[i], m[n] = m[n], m[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":9702,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:33:16","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":20179,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:33:16","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":22274,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:40:37","func_code":"def count_letters(l):\n letter_sum = 0\n for k in l:\n letter_sum += 1\n return count_letters(l)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":7436,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:42:46","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":27964,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:42:46","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":23415,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:42:52","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":19635,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:42:52","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":24213,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:43:06","func_code":"def minimum(s):\n if len(s) == 1:\n return s[0]\n else:\n min_ret = minimum(s[1:])\n return s[0] if s[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":3952,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:43:06","func_code":"def minimum(s):\n if len(s) == 1:\n return s[0]\n else:\n min_ret = minimum(s[1:])\n return s[0] if s[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":30886,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:43:11","func_code":"def count_letters(l):\n return 1 + count_letters(s[1:]) if l else 0","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":5960,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:43:30","func_code":"def count_letters(l):\n return 1 + count_letters(l[1:]) if l else 0","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":38017,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:43:30","func_code":"def count_letters(l):\n return 1 + count_letters(l[1:]) if l else 0","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":3139,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:46:28","func_code":"def fibonacci(n):\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":6457,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:47:58","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":40452,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:47:58","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"circle_62.py_ca117_overlap","academic_year":2016,"module":"ca117","test":"assert overlap(0,0,0,0,0,0)==False and overlap(-10127,-4523146639991987157,4984975518095343106,16069,-6161206257421287809,-21999)==True and overlap(28812,-95,-14565,-14231,-57,-13105)==False and overlap(29825,-1453,8499,60,-25950,-863536228)==False and overlap(4254,-23892,-290,8971,1739,-4934)==False and overlap(-632291906,26448,10662,-106,-158122742,24689)==False","description":"Test if two circles overlap.","correct":true} -{"submission_id":4456,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:47:58","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":40957,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:47:58","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":18431,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:48:14","func_code":"def fibonacci(n):\n a, b = 1, 1\n for i in range(n):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":10063,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:48:14","func_code":"def fibonacci(n):\n a, b = 1, 1\n for i in range(n):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":23794,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:48:24","func_code":"def reverse_list(l):\n for i in reversed(l):\n return reverse_list(l)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":15883,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 15:49:43","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[-1]:\n return minimum(l[:-1])\n else:\n return minimum(l[1:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":24722,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 15:49:43","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[-1]:\n return minimum(l[:-1])\n else:\n return minimum(l[1:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":17404,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:49:55","func_code":"def reverse_list(l):\n return l.reverse()","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":6287,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:52:21","func_code":"def reverse_list(l):\n return [x for x in reversed(l)]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":185,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:52:21","func_code":"def reverse_list(l):\n return [x for x in reversed(l)]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":10701,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:55:12","func_code":"def fibonacci(a):\n if a == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":39385,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:55:33","func_code":"def fibonacci(a):\n if a == 0:\n return 1\n elif a == 1:\n return 1\n return fibonacci(a - 1) + fibonacci(a - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":24972,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:55:33","func_code":"def fibonacci(a):\n if a == 0:\n return 1\n elif a == 1:\n return 1\n return fibonacci(a - 1) + fibonacci(a - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":30777,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:55:33","func_code":"def fibonacci(a):\n if a == 0:\n return 1\n elif a == 1:\n return 1\n return fibonacci(a - 1) + fibonacci(a - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":27479,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 15:59:46","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[-1]:\n return maximum(l[1:])\n else:\n return maximum(l[:-1])","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":21005,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 15:59:46","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[-1]:\n return maximum(l[1:])\n else:\n return maximum(l[:-1])","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":3172,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 16:03:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":13234,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 16:03:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":41870,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 16:03:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":16986,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:06:26","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":25154,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:06:26","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":18210,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:09:35","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n m = minimum(l[1:])\n if m < l[0]:\n return m\n else:\n return l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":14823,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:09:35","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n m = minimum(l[1:])\n if m < l[0]:\n return m\n else:\n return l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":12232,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:10:35","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":36787,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:10:35","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":26031,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:13:28","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n m = maximum(l[1:])\n if m > l[0]:\n return m\n else:\n return l[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":8558,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:13:28","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n m = maximum(l[1:])\n if m > l[0]:\n return m\n else:\n return l[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":7385,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 16:16:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":14494,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 16:16:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":1932,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 16:16:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":31571,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:16:58","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":13633,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:16:58","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":37754,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:18:27","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":26373,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:18:27","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":31639,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:20:15","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":2407,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:20:15","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":1887,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:22:23","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":11293,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:22:23","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":20826,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:23:38","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":16497,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:23:38","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":30234,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:23:38","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":11116,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:24:45","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":9474,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:24:45","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":28105,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:39:57","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":3087,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:39:57","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":28610,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:40:41","func_code":"def minimum(l):\n return min(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":33618,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:40:41","func_code":"def minimum(l):\n return min(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":10667,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:42:29","func_code":"def maximum(l):\n return max(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":21966,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:42:29","func_code":"def maximum(l):\n return max(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":5442,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:44:59","func_code":"def count_letters(a):\n return len(a)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":3860,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:44:59","func_code":"def count_letters(a):\n return len(a)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":11437,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:46:13","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":7081,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:46:13","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":11712,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:46:13","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":28189,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:51:02","func_code":"def reverse_list(l):\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":42375,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:51:02","func_code":"def reverse_list(l):\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":18783,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:54:49","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":19921,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:54:49","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":10654,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:57:12","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":31133,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:57:12","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":35830,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:58:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":662,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:58:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20231,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:58:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":11559,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 17:17:10","func_code":"def fibonacci(s):\n if s == 0:\n return 0\n if s in (1, 2):\n return 1\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":14658,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 17:18:17","func_code":"def fibonacci(s):\n if s == 0:\n return 0\n if s in (0, 1):\n return 1\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":21047,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 17:18:31","func_code":"def fibonacci(s):\n if s in (0, 1):\n return 1\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":15519,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 17:18:31","func_code":"def fibonacci(s):\n if s in (0, 1):\n return 1\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":10842,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:47:33","func_code":"def quicksort(array, b, c):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n greater = [i for i in array if i == piv]\n array = less + greater + equal","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":10702,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:47:57","func_code":"def quicksort(array, b, c):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n greater = [i for i in array if i == piv]\n array = greater + equal + less","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":10273,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:49:45","func_code":"def quicksort(array, b, c):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n less = [i for i in array if i == piv]\n quicksort(greater, b, c)\n quicksort(less, b, c)\n array = greater + equal + less","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":1851,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:50:32","func_code":"def quicksort(array, b, c):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n quicksort(greater, b, c)\n quicksort(less, b, c)\n array = greater + equal + less","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":355,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:52:52","func_code":"def quicksort(array, b, c):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n print(less)\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n quicksort(greater, b, c)\n quicksort(less, b, c)\n array = greater + equal + less","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":17609,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:58:58","func_code":"def _quicksort(array):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return quicksort(greater, b, c) + equal + quicksort(less, b, c)\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":16028,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:59:18","func_code":"def _quicksort(array):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return quicksort(greater) + equal + quicksort(less)\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":27986,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:59:43","func_code":"def _quicksort(array):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return _quicksort(greater) + equal + _quicksort(less)\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":20683,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:00:15","func_code":"def _quicksort(array):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return _quicksort(greater) + equal + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":15725,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:01:07","func_code":"def _quicksort(array):\n less = []\n greater = []\n print(greater)\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return _quicksort(greater) + equal + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":41673,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:01:27","func_code":"def minimum(l):\n l = sorted(minimum(l))\n return l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":38503,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:01:36","func_code":"def _quicksort(array):\n less = []\n greater = []\n print(greater)\n equal = []\n if len(array) > 0:\n piv = array[0]\n print(piv)\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return _quicksort(greater) + equal + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":11120,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:01:55","func_code":"def minimum(l):\n l = sorted(minimum(l))\n return l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":20159,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:02:06","func_code":"def _quicksort(array):\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return _quicksort(greater) + equal + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":35146,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:02:39","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n elif l[0] > l[1]:\n l.remove(l[0])\n else:\n l.remove(l[1])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":30297,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:02:39","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n elif l[0] > l[1]:\n l.remove(l[0])\n else:\n l.remove(l[1])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":8940,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:02:43","func_code":"def _quicksort(array):\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n print(less)\n greater = [i for i in array if i >= piv]\n return _quicksort(greater) + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":19086,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:03:26","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n elif l[0] < l[1]:\n l.remove(l[0])\n else:\n l.remove(l[1])\n return minimum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":25763,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:03:44","func_code":"def _quicksort(array):\n if len(array) > 0:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less += i\n else:\n greater += i\n return _quicksort(greater) + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":18668,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:04:08","func_code":"def _quicksort(array):\n if len(array) > 0:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + i\n else:\n greater = greater + i\n return _quicksort(greater) + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":31808,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:04:25","func_code":"def _quicksort(array):\n if len(array) > 0:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + [i]\n else:\n greater = greater + [i]\n return _quicksort(greater) + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":24824,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:04:27","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n elif l[0] < l[1]:\n l.remove(l[0])\n else:\n l.remove(l[1])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":5193,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:04:27","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n elif l[0] < l[1]:\n l.remove(l[0])\n else:\n l.remove(l[1])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":1530,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:05:17","func_code":"def _quicksort(array):\n if len(array) > 0:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + [i]\n else:\n greater = greater + [i]\n print(less)\n return _quicksort(greater) + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":19961,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:07:30","func_code":"def _quicksort(array):\n if array <= 1:\n return array\n else:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + [i]\n else:\n greater = greater + [i]\n return _quicksort(greater) + _quicksort(less)\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":32564,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:07:47","func_code":"def _quicksort(array):\n if len(array) <= 1:\n return array\n else:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + [i]\n else:\n greater = greater + [i]\n return _quicksort(greater) + _quicksort(less)\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":1832,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:07:49","func_code":"def count_letters(l):\n return len(l)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":30473,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:08:58","func_code":"def count_letters(l):\n return len(l)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":26108,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:09:04","func_code":"def _quicksort(array):\n if len(array) <= 1:\n return array\n else:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + [i]\n else:\n greater = greater + [i]\n less = _quicksort(less)\n more = _quicksort(more)\n return less + more\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":36541,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:09:35","func_code":"def _quicksort(array):\n if len(array) <= 1:\n return array\n else:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + [i]\n else:\n greater = greater + [i]\n less = _quicksort(less)\n greater = _quicksort(greater)\n return less + greater\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":10019,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:12:51","func_code":"def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return quicksort(less) + [pivot] + quicksort(more)\n\n\ndef quicksort(l, a, b):\n\n def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return quicksort(less) + [pivot] + quicksort(more)\n l = _quicksort(l)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":41513,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:13:12","func_code":"def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n\n\ndef quicksort(l, a, b):\n\n def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n l = _quicksort(l)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":12265,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:13:21","func_code":"def count_letters(l):\n return len(l)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":25271,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:13:21","func_code":"def count_letters(l):\n return len(l)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":2996,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:13:34","func_code":"def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n\n\ndef quicksort(l, a, b):\n\n def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n print(_quicksort(l))","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":35305,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:14:22","func_code":"def reverse_list(l):\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":34905,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:14:22","func_code":"def reverse_list(l):\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":37232,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:15:04","func_code":"def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n\n\ndef quicksort(l, a, b):\n\n def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n l[:] = _quicksort(l)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":9666,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:15:04","func_code":"def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n\n\ndef quicksort(l, a, b):\n\n def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n l[:] = _quicksort(l)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":21226,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:20:49","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":22968,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:20:49","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":38308,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:33:04","func_code":"def chksorted(a):\n for i in range(len(a) - 1):\n if not a[i] < a[i + 1]:\n return False\n return True\n\n\ndef selectionsort(array):\n\n def chksorted(a):\n for i in range(len(a) - 1):\n if not a[i] < a[i + 1]:\n return False\n return True\n m = min(array)\n mi = array.index(m)\n if not chksorted(array):\n f = array[0]\n array[0] = m\n array[mi] = f","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":16459,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:34:27","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":11597,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:34:27","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":29462,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:34:58","func_code":"def selectionsort(array):\n for i in range(len(arr)):\n for j in range(i, len(arr)):\n if arr[i] > arr[j]:\n arr[i], arr[j] = arr[j], arr[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27477,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:35:43","func_code":"def selectionsort(array):\n for i in range(len(arr)):\n for j in range(i, len(arr)):\n if arr[i] > arr[j]:\n arr[i], arr[j] = arr[j], arr[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":18874,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:36:22","func_code":"def selectionsort(array):\n for i in range(len(array)):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":9846,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:36:22","func_code":"def selectionsort(array):\n for i in range(len(array)):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":29429,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:36:22","func_code":"def selectionsort(array):\n for i in range(len(array)):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":22963,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:45:42","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n p = i\n j = i + 1\n while j < len(n):\n if n[j] < n[i]:\n p = j\n j += 1\n tmp = n[p]\n n[p] = n[i]\n n[i] = temp\n i = +1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":42255,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:46:01","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n p = i\n j = i + 1\n while j < len(n):\n if n[j] < n[i]:\n p = j\n j += 1\n tmp = n[p]\n n[p] = n[i]\n n[i] = tmp\n i = +1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28243,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:47:50","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[i]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = +1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":1654,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:53:34","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = +1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35890,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 20:11:53","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[i]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = +1\n return selectionsort(A)","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":34813,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 20:13:46","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = +1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17693,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 20:15:18","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":18485,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 20:15:18","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":26492,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 20:15:18","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35892,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:33:29","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":39803,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:33:29","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":18204,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:35:38","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":13334,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:35:38","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":39455,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:46:01","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q = q + 1\n j = j + 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":20671,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:46:01","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q = q + 1\n j = j + 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":21071,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:50:01","func_code":"def reverse_list(n):\n if len(n) == 1:\n return n\n else:\n return [n[0]] + reverse_list(n[1:])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":19369,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:50:27","func_code":"def reverse_list(n):\n if len(n) == 1:\n return n\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":24275,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:50:48","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":33907,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:50:48","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":35055,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:53:56","func_code":"def count_letters(word):\n if len(word) == 0:\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":17627,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:53:56","func_code":"def count_letters(word):\n if len(word) == 0:\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":7855,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:13:24","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":13774,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:13:24","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":1472,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 22:19:44","func_code":"def minimum(n):\n n.sort()\n return n[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":663,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 22:19:44","func_code":"def minimum(n):\n n.sort()\n return n[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":40903,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 22:20:23","func_code":"def maximum(n):\n n.sort()\n return n[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":38826,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 22:20:23","func_code":"def maximum(n):\n n.sort()\n return n[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":21704,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 22:20:23","func_code":"def maximum(n):\n n.sort()\n return n[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":26765,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:37:49","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":41409,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:37:49","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":11948,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 22:40:44","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n return min(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":2256,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 22:45:10","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n return [s for s in l if all(s <= i for i in l)][0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":36155,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 22:45:10","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n return [s for s in l if all(s <= i for i in l)][0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":22893,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 22:46:27","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n return [s for s in l if all(s >= i for i in l)][0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":35751,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 22:46:27","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n return [s for s in l if all(s >= i for i in l)][0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":8631,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:55:44","func_code":"def recursive_selectionsort(A, i):\n if i >= len(a) - 1:\n return\n else:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n recursive_selectionsort(A, i + 1)\n\n\ndef selectionsort(A):\n recursive_selectionsort(A, 0)","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":2229,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:56:31","func_code":"def recursive_selectionsort(A, i):\n if i >= len(a) - 1:\n return\n else:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n recursive_selectionsort(A, i + 1)\n\n\ndef selectionsort(A):\n recursive_selectionsort(A, 0)","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39994,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:58:33","func_code":"def recursive_selectionsort(A, i):\n if i >= len(a) - 1:\n return\n else:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n recursive_selectionsort(A, i + 1)\n\n\ndef selectionsort(A):\n recursive_selectionsort(A, 0)","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":21126,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 23:01:32","func_code":"def recursive_selectionsort(A, i):\n if i >= len(A) - 1:\n return\n else:\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n recursive_selectionsort(A, i + 1)\n\n\ndef selectionsort(A):\n recursive_selectionsort(A, 0)","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5146,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 23:01:32","func_code":"def recursive_selectionsort(A, i):\n if i >= len(A) - 1:\n return\n else:\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n recursive_selectionsort(A, i + 1)\n\n\ndef selectionsort(A):\n recursive_selectionsort(A, 0)","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25353,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 23:01:32","func_code":"def recursive_selectionsort(A, i):\n if i >= len(A) - 1:\n return\n else:\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n recursive_selectionsort(A, i + 1)\n\n\ndef selectionsort(A):\n recursive_selectionsort(A, 0)","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23176,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:02:47","func_code":"def count_letters(s):\n if s == '':\n return 0\n a = 0\n for letter in s:\n a += 1\n return a","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":33890,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:02:47","func_code":"def count_letters(s):\n if s == '':\n return 0\n a = 0\n for letter in s:\n a += 1\n return a","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":9500,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:06:32","func_code":"def reverse_list(l):\n if l == []:\n return none\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":29364,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:07:43","func_code":"def reverse_list(l):\n if l == []:\n return None\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":10086,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:09:24","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":38841,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:09:24","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":40216,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:21:32","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":4215,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:21:32","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":9487,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:45:08","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":2446,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:45:08","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":15105,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:45:08","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":42143,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 00:00:28","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":11294,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 00:00:28","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":3491,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 00:02:14","func_code":"def selectionsort(a):\n a = a[:]\n out = []\n while a:\n smallest = min(a)\n a.remove(smallest)\n out.append(smallest)\n return out","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":26827,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 00:22:36","func_code":"def selectionsort(a):\n a = a[:]\n out = []\n if a:\n smallest = min(a)\n a.remove(smallest)\n out.append(smallest)\n return out","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":1670,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:32:28","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tmp = minimum(l[1:])\n return tmp if tmp > l[0] else l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":7215,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:32:45","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tmp = minimum(l[1:])\n return tmp if tmp < l[0] else l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":2643,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:34:09","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m < l[0] else l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":35229,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:34:09","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m < l[0] else l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":12476,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:35:10","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = maximum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":16085,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:35:10","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = maximum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":14487,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 00:36:06","func_code":"def selectionsort(a):\n a = a[:]\n sortedlist = []\n while a:\n smallest = min(a)\n a.remove(smallest)\n sortedlist.append(smallest)\n return sortedlist","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":41571,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 00:44:48","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n timp = a[p]\n a[p] = a[i]\n a[i] = temp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":40013,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:48:33","func_code":"def count_letters(s):\n if s == '':\n return 0\n return count_letters(s[1:]) + 1","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":31241,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:48:33","func_code":"def count_letters(s):\n if s == '':\n return 0\n return count_letters(s[1:]) + 1","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":31842,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:54:17","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":35340,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:55:13","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":11348,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:56:21","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":711,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:58:24","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l[1:].append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":32660,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:58:53","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l.append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":17286,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:59:09","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":26250,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:59:23","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l[0]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":27681,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:59:43","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l.append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":35230,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:59:59","func_code":"def reverse_list(l):\n if l == []:\n return []\n return [1, 2].append(l[0])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":37874,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 01:00:13","func_code":"def swap(A, x, y):\n tmp = A[x]\n A[x] = A[y]\n A[y] = tmp\n\n\ndef selectionsort(a):\n for i in range(len(a)):\n least = i\n for k in range(i + 1, len(a)):\n if a[k] < a[least]:\n least = k\n swap(a, least, i)","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41794,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 01:00:13","func_code":"def swap(A, x, y):\n tmp = A[x]\n A[x] = A[y]\n A[y] = tmp\n\n\ndef selectionsort(a):\n for i in range(len(a)):\n least = i\n for k in range(i + 1, len(a)):\n if a[k] < a[least]:\n least = k\n swap(a, least, i)","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":1017,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:01:15","func_code":"def reverse_list(l):\n if l == []:\n return []\n new = reverse_list(l[1:]).append(l[0])\n return new","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":40759,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:01:53","func_code":"def reverse_list(l):\n if l == []:\n return []\n new = l.append(l[0])\n return new","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":14650,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:02:14","func_code":"def reverse_list(l):\n if l == []:\n return []\n new = l[1:]\n return new","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":6915,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:04:28","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l[1:] + l[0]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":15947,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:15:34","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":18082,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:16:05","func_code":"def reverse_list(l):\n return reverse_list(l[1:]) + [l[0]] if l else []","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":41116,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:16:05","func_code":"def reverse_list(l):\n return reverse_list(l[1:]) + [l[0]] if l else []","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":34477,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:24:46","func_code":"def fibonacci(n):\n if n < 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":36943,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:24:46","func_code":"def fibonacci(n):\n if n < 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":17831,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:08:02","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, q, r):\n if r <= q:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":23929,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:08:47","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= q:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":19523,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:09:21","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":22386,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:11:31","func_code":"def partition(a, p, pivot):\n q = j = p\n while j < pivot:\n if a[j] <= a[pivot]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[pivot] = a[pivot], a[q]\n return q\n\n\ndef quicksort(a, p, pivot):\n if pivot <= p:\n return\n q = partition(a, p, pivot)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, pivot)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":13733,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:13:33","func_code":"def partition(a, start, pivot):\n lower = upper = start\n while upper < pivot:\n if a[upper] <= a[pivot]:\n a[lower], a[upper] = a[upper], a[lower]\n lower += 1\n upper += 1\n a[lower], a[pivot] = a[pivot], a[lower]\n return lower\n\n\ndef quicksort(a, start, pivot):\n if pivot <= start:\n return\n lower = partition(a, start, pivot)\n quicksort(a, start, lower - 1)\n quicksort(a, lower + 1, pivot)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":24629,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:19:20","func_code":"def partition(a, start, pivot):\n lower = upper = start\n while upper < pivot:\n if a[upper] <= a[pivot]:\n a[lower], a[upper] = a[upper], a[lower]\n lower += 1\n upper += 1\n a[lower], a[pivot] = a[pivot], a[lower]\n return lower\n\n\ndef quicksort(a, start, pivot):\n if pivot <= start:\n return\n mid = partition(a, start, pivot)\n quicksort(a, start, mid - 1)\n quicksort(a, mid + 1, pivot)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":35956,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:27:21","func_code":"def partition(a, start, pivot):\n lower = upper = start\n while upper < pivot:\n if a[upper] <= a[pivot]:\n a[lower], a[upper] = a[upper], a[lower]\n lower += 1\n upper += 1\n a[lower], a[pivot] = a[pivot], a[lower]\n return lower\n\n\ndef quicksort(a, start, pivot):\n if pivot <= start:\n return\n mid = partition(a, start, pivot)\n quicksort(a, start, mid - 1)\n quicksort(a, mid + 1, pivot)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":12652,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:27:21","func_code":"def partition(a, start, pivot):\n lower = upper = start\n while upper < pivot:\n if a[upper] <= a[pivot]:\n a[lower], a[upper] = a[upper], a[lower]\n lower += 1\n upper += 1\n a[lower], a[pivot] = a[pivot], a[lower]\n return lower\n\n\ndef quicksort(a, start, pivot):\n if pivot <= start:\n return\n mid = partition(a, start, pivot)\n quicksort(a, start, mid - 1)\n quicksort(a, mid + 1, pivot)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":21574,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:32:54","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n k = 0\n while k < len(a):\n print(a[k])\n k = k + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":29645,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:33:41","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":2512,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:35:36","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[p], a[i] = a[i], a[p]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":32119,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:35:36","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[p], a[i] = a[i], a[p]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":1945,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-26 02:49:35","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":10131,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-26 02:50:56","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":6863,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-26 02:50:56","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25722,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-26 02:51:23","func_code":"def sort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = sort(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":16646,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-26 02:51:23","func_code":"def sort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = sort(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":40228,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-26 02:51:23","func_code":"def sort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = sort(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":39872,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-26 11:24:40","func_code":"def fibonacci(n):\n prev = 0\n cur = 1\n i = 0\n while i < n:\n tmp = cur\n cur = cur + prev\n prev = tmp\n i = i + 1\n return cur","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":32484,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-26 11:24:40","func_code":"def fibonacci(n):\n prev = 0\n cur = 1\n i = 0\n while i < n:\n tmp = cur\n cur = cur + prev\n prev = tmp\n i = i + 1\n return cur","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":18959,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 11:50:40","func_code":"def minimum(a):\n if a == []:\n return 1\n tmp = a.pop()\n if tmp < minimun(a):\n return tmp","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":17326,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 11:57:08","func_code":"def minimum(a):\n if a.pop() < a[-1]:\n tmp = a.pop()\n if a == []:\n return tmp\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":14121,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 11:57:52","func_code":"def minimum(a):\n if a == []:\n return tmp\n if a.pop() < a[-1]:\n tmp = a.pop()\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":41534,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 11:58:50","func_code":"def minimum(a):\n if a == []:\n return tmp\n if a.pop() < a[-1]:\n print(a[-1])\n tmp = a.pop()\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":42135,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:00:16","func_code":"def minimum(a):\n if a == []:\n return tmp\n if a.pop() < a[-1]:\n print(a.pop())\n tmp = a.pop()\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":23053,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:12:04","func_code":"def minimum(a):\n if a == []:\n return b[0]\n if a[-1] < a[-2]:\n b.append(a[-1])\n if len(b) > 1:\n if b[0] > b[1]:\n b.remove(b[0])\n else:\n b.remove(b[1])\n return minimum(a[:-1])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":9796,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:17:26","func_code":"def minimum(a, flag=True):\n if a == []:\n return tmp\n if flag == True:\n tmp = a.pop()\n print(tmp)\n if a[-1] < tmp:\n tmp = a[-1]\n return minimum(a[:-1], flag=False)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":39331,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-26 12:17:51","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1\n return A","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":11782,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-26 12:17:51","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1\n return A","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":2651,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-26 12:18:04","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":23041,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-26 12:18:04","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":20881,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:18:10","func_code":"def minimum(a, flag=True):\n if a == []:\n return tmp\n if flag == True:\n tmp = a.pop()\n if a[-1] < tmp:\n tmp = a[-1]\n return minimum(a[:-1], flag=False)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":29747,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:22:04","func_code":"def minimum(a, flag=True):\n if a == []:\n return tmp\n if flag == True:\n tmp = a.pop()\n if a[-1] < tmp:\n tmp = a[-1]\n return minimum(a[:-1], flag=False)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":30204,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:24:09","func_code":"def minimum(a, tmp=0):\n if a == []:\n return tmp\n if a[-1] < tmp:\n tmp = a[-1]\n return minimum(a[:-1], tmp)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":19844,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:24:42","func_code":"def minimum(a, tmp=0):\n if a == []:\n return tmp\n if tmp == 0 or a[-1] < tmp:\n tmp = a[-1]\n return minimum(a[:-1], tmp)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":1010,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:24:42","func_code":"def minimum(a, tmp=0):\n if a == []:\n return tmp\n if tmp == 0 or a[-1] < tmp:\n tmp = a[-1]\n return minimum(a[:-1], tmp)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":9895,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:25:35","func_code":"def maximum(a, tmp=0):\n if a == []:\n return tmp\n if tmp == 0 or a[-1] > tmp:\n tmp = a[-1]\n return minimum(a[:-1], tmp)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":39231,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:25:53","func_code":"def maximum(a, tmp=0):\n if a == []:\n return tmp\n if tmp == 0 or a[-1] > tmp:\n tmp = a[-1]\n return maximum(a[:-1], tmp)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":36252,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:25:53","func_code":"def maximum(a, tmp=0):\n if a == []:\n return tmp\n if tmp == 0 or a[-1] > tmp:\n tmp = a[-1]\n return maximum(a[:-1], tmp)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":24492,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:28:23","func_code":"def count_letters(a, count=0):\n if len(a) == 0:\n return count\n count += 1\n return count_letters(a - 1, count)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":9557,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:28:45","func_code":"def count_letters(a, count=0):\n if len(a) == 0:\n return count\n count += 1\n return count_letters(a[:-1], count)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":35107,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:31:20","func_code":"def reverse_list(a, b=[]):\n if a == []:\n return b\n b.append(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":31079,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:32:52","func_code":"def reverse_list(a, b=[]):\n if a == []:\n return b\n b.append(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":19334,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:35:23","func_code":"def reverse_list(a, b=[]):\n if a == []:\n tmp = b\n b = []\n return tmp\n b.append(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":5576,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:35:59","func_code":"def count_letters(a, count=0):\n if len(a) == 0:\n return count\n count += 1\n return count_letters(a[:-1], count)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":398,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:35:59","func_code":"def count_letters(a, count=0):\n if len(a) == 0:\n return count\n count += 1\n return count_letters(a[:-1], count)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":25607,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:37:45","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.split('')\n b += ' ' + a[-1]\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":12830,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:38:16","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.split('')\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":11863,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:38:42","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.split(' ')\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":2480,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:39:16","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.split('')\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":6553,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:39:30","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.split(' ')\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":39910,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:39:54","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.strip.split(' ')\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":4358,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:40:25","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.split(' ').strip()\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":1220,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:40:44","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.strip().split(' ')\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":15410,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:41:25","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b\n b.append(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":39816,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:41:37","func_code":"def reverse_list(a, b=[]):\n if a == []:\n return b\n b.append(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":36814,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:44:25","func_code":"def reverse_list(a, b=[], flag=True):\n if flag == True:\n b = []\n if a == []:\n return b\n b.append(a[-1])\n return reverse_list(a[:-1], b, flag=False)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":38577,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:44:25","func_code":"def reverse_list(a, b=[], flag=True):\n if flag == True:\n b = []\n if a == []:\n return b\n b.append(a[-1])\n return reverse_list(a[:-1], b, flag=False)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":10554,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:48:50","func_code":"def fibonacci(a):\n if a == 0:\n return 0\n return 1 + fibonacci(a - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":25853,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:49:08","func_code":"def fibonacci(a):\n if a == 0:\n return 1\n return 1 + fibonacci(a - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":36655,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:50:25","func_code":"def fibonacci(a, curr=1):\n if a == 0:\n return curr\n return curr + fibonacci(a - 1, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":26196,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:00:12","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return 0\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":1581,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 13:00:21","func_code":"def minimum(mylist):\n if len(mylist) == 1:\n return mylist[0]\n if mylist[0] > mylist[1]:\n mylist.remove(mylist[0])\n return minimum(mylist)\n else:\n mylist.remove(mylist[1])\n return minimum(mylist)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":4613,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 13:00:21","func_code":"def minimum(mylist):\n if len(mylist) == 1:\n return mylist[0]\n if mylist[0] > mylist[1]:\n mylist.remove(mylist[0])\n return minimum(mylist)\n else:\n mylist.remove(mylist[1])\n return minimum(mylist)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":10014,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:01:04","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m < l[0] else l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":6543,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:01:04","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m < l[0] else l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":10122,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:01:08","func_code":"def fibonacci(a, prev=0, curr=1):\n if a == 0:\n return 1\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":38858,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:01:40","func_code":"def fibonacci(a, prev=0, curr=1):\n if a == 0:\n return 0\n prev = curr\n return 1 + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":24920,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 13:01:59","func_code":"def maximum(mylist):\n if len(mylist) == 1:\n return mylist[0]\n if mylist[0] < mylist[1]:\n mylist.remove(mylist[0])\n return minimum(mylist)\n else:\n mylist.remove(mylist[1])\n return minimum(mylist)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":150,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:02:05","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":39421,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:02:07","func_code":"def fibonacci(a, prev=0, curr=1):\n if a == 0:\n return 1\n prev = curr\n return 1 + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":22073,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:02:18","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":18777,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:02:20","func_code":"def fibonacci(a, prev=0, curr=1):\n if a == 0:\n return prev\n prev = curr\n return 1 + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":15042,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:02:26","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":11266,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:02:35","func_code":"def fibonacci(a, prev=0, curr=1):\n if a == 0:\n return prev\n prev = curr\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":42228,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:03:09","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = maximum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":42148,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:03:09","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = maximum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":24206,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:03:20","func_code":"def fibonacci(a, prev=0, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += tmp\n prev = curr\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":1296,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:04:04","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += tmp\n prev = curr\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":32257,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:04:40","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += pev\n prev = curr\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":39870,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:04:49","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += prev\n prev = curr\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":6400,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:05:45","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += prev\n prev = tmp\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":24326,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:06:52","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += prev\n prev = tmp\n return fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":39250,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:06:52","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += prev\n prev = tmp\n return fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":9408,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:06:52","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += prev\n prev = tmp\n return fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":12781,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 13:09:09","func_code":"def maximum(mylist):\n if len(mylist) == 1:\n return mylist[0]\n if mylist[0] < mylist[1]:\n mylist.remove(mylist[0])\n return maximum(mylist)\n else:\n mylist.remove(mylist[1])\n return maximum(mylist)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":37467,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 13:09:09","func_code":"def maximum(mylist):\n if len(mylist) == 1:\n return mylist[0]\n if mylist[0] < mylist[1]:\n mylist.remove(mylist[0])\n return maximum(mylist)\n else:\n mylist.remove(mylist[1])\n return maximum(mylist)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":25111,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:10:03","func_code":"def count_letters(word):\n if not word:\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":14683,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:10:16","func_code":"def count_letters(word):\n if not word:\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":25042,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:10:16","func_code":"def count_letters(word):\n if not word:\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":40823,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:10:16","func_code":"def count_letters(word):\n if not word:\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":36561,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 13:11:31","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[-2] > a[-1]:\n a[-2], a[-1] = a[-1], a[-2]\n a.pop()\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":326,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 13:12:02","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[-2] > a[-1]:\n a[-2], a[-1] = a[-1], a[-2]\n a.pop()\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":25265,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 13:12:02","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[-2] > a[-1]:\n a[-2], a[-1] = a[-1], a[-2]\n a.pop()\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":10031,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 13:13:00","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[-2] < a[-1]:\n a[-2], a[-1] = a[-1], a[-2]\n a.pop()\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":17364,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 13:13:00","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[-2] < a[-1]:\n a[-2], a[-1] = a[-1], a[-2]\n a.pop()\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":25109,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 13:51:50","func_code":"def count_letters(word, count=0):\n if word == '':\n return count\n else:\n word = word[1:]\n return count_letters(word, count + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":31131,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 13:51:50","func_code":"def count_letters(word, count=0):\n if word == '':\n return count\n else:\n word = word[1:]\n return count_letters(word, count + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":36361,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:53:02","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":1959,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:53:02","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":31529,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 13:56:44","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":26147,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 13:56:44","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":11687,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:57:14","func_code":"def reverse_list(n):\n if n == 1:\n return 0\n else:\n return reverse_list(n - 1)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":13589,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:58:33","func_code":"def reverse_list(n):\n if n == 1:\n return 0\n else:\n return reverse_list(n[-1:])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":30193,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:58:52","func_code":"def reverse_list(n):\n if n == 1:\n return 0\n else:\n return reverse_list(n)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":7857,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:59:14","func_code":"def reverse_list(n):\n if n == 1:\n return 0\n else:\n return reverse_list(n - 1)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":40030,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:59:50","func_code":"def reverse_list(n=[]):\n if len(n) == 1:\n return 0\n else:\n return reverse_list(n - 1)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":164,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 14:00:05","func_code":"def reverse_list(n=[]):\n if len(n) == 1:\n return 0\n else:\n return reverse_list(n)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":9495,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 14:02:54","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":37907,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 14:02:54","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":719,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 14:02:54","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":38540,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 14:06:28","func_code":"def count_letters(s, i=0):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":27689,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 14:06:28","func_code":"def count_letters(s, i=0):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":12792,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-26 14:10:52","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n else:\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":12559,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-26 14:10:52","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n else:\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":24421,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 14:12:28","func_code":"def count_letters(word):\n if word == '':\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":36440,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 14:12:28","func_code":"def count_letters(word):\n if word == '':\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":26130,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 14:12:28","func_code":"def count_letters(word):\n if word == '':\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":4599,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-26 14:16:22","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":21026,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-26 14:16:22","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":28591,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-26 14:16:22","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":1506,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 14:34:31","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n p = i\n j = i + 1\n while j < len(n):\n if n[j] < n[p]:\n p = j\n j = j + 1\n temp = n[p]\n n[p] = n[i]\n n[i] = temp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":15001,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 14:34:31","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n p = i\n j = i + 1\n while j < len(n):\n if n[j] < n[p]:\n p = j\n j = j + 1\n temp = n[p]\n n[p] = n[i]\n n[i] = temp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":2756,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 14:34:31","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n p = i\n j = i + 1\n while j < len(n):\n if n[j] < n[p]:\n p = j\n j = j + 1\n temp = n[p]\n n[p] = n[i]\n n[i] = temp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":24604,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 14:37:23","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":33134,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 14:37:23","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":27709,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 14:48:53","func_code":"def fibonacci(n, first_number=0, second_number=1, counter=0):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n elif n == counter:\n return second_number\n else:\n holder = second_number\n second_number += first_number\n first_number = holder\n return fibonacci(n, first_number, second_number, counter + 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":178,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 14:49:28","func_code":"def fibonacci(n, first_number=0, second_number=1, counter=0):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n elif n == counter:\n return second_number\n else:\n holder = second_number\n second_number += first_number\n first_number = holder\n return fibonacci(n, first_number, second_number, counter + 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":13056,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 14:50:32","func_code":"def fibonacci(n, first_number=0, second_number=1, counter=0):\n if n == 0:\n print('HEYA')\n return 0\n elif n == 1:\n return 1\n elif n == counter:\n return second_number\n else:\n holder = second_number\n second_number += first_number\n first_number = holder\n return fibonacci(n, first_number, second_number, counter + 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":38310,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 14:51:26","func_code":"def fibonacci(n, first_number=0, second_number=1, counter=0):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n elif n == counter:\n return second_number\n else:\n holder = second_number\n second_number += first_number\n first_number = holder\n return fibonacci(n, first_number, second_number, counter + 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":39579,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 14:51:26","func_code":"def fibonacci(n, first_number=0, second_number=1, counter=0):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n elif n == counter:\n return second_number\n else:\n holder = second_number\n second_number += first_number\n first_number = holder\n return fibonacci(n, first_number, second_number, counter + 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":23598,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 15:02:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":13749,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 15:03:03","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":41735,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 15:03:03","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":13692,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:11:20","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":28120,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:11:20","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":3730,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:14:32","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":26713,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:14:32","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":39322,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:16:51","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":9187,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:16:51","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":30016,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:16:51","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":26112,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 15:17:36","func_code":"def reverse_list(a):\n if a == []:\n return a\n return reverse_list(a[1:]) + [a[0]]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":23703,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 15:17:36","func_code":"def reverse_list(a):\n if a == []:\n return a\n return reverse_list(a[1:]) + [a[0]]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":27927,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 15:17:36","func_code":"def reverse_list(a):\n if a == []:\n return a\n return reverse_list(a[1:]) + [a[0]]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":285,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 15:17:59","func_code":"def selectionsort(array):\n for i in range(len(array)):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":4971,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 15:17:59","func_code":"def selectionsort(array):\n for i in range(len(array)):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":1306,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 15:17:59","func_code":"def selectionsort(array):\n for i in range(len(array)):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25008,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:29:59","func_code":"def minimum(lst):\n if len(lst) == 1:\n return lst[0]\n if lst[0] < lst[1]:\n lst.remove(lst[1])\n else:\n lst.remove(lst[0])\n return minimum(lst)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":18829,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:29:59","func_code":"def minimum(lst):\n if len(lst) == 1:\n return lst[0]\n if lst[0] < lst[1]:\n lst.remove(lst[1])\n else:\n lst.remove(lst[0])\n return minimum(lst)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":29672,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:42:00","func_code":"def maximum(lst):\n if len(lst) == 1:\n return lst[0]\n if lst[0] > lst[1]:\n lst.remove(lst[q])\n else:\n lst.remove(lst[0])\n return maximum(lst)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":6664,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:42:20","func_code":"def maximum(lst):\n if len(lst) == 1:\n return lst[0]\n if lst[0] > lst[1]:\n lst.remove(lst[0])\n else:\n lst.remove(lst[0])\n return maximum(lst)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":18416,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:43:04","func_code":"def maximum(lst):\n if len(lst) == 1:\n return lst[0]\n if lst[0] > lst[1]:\n lst.remove(lst[1])\n else:\n lst.remove(lst[0])\n return maximum(lst)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":26121,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:43:04","func_code":"def maximum(lst):\n if len(lst) == 1:\n return lst[0]\n if lst[0] > lst[1]:\n lst.remove(lst[1])\n else:\n lst.remove(lst[0])\n return maximum(lst)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":8083,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 16:38:58","func_code":"def reverse_list(lst):\n l = lst[::-1]\n return l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":5529,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 16:38:58","func_code":"def reverse_list(lst):\n l = lst[::-1]\n return l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":37980,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 17:01:17","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":36133,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 17:01:17","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":4384,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:02:36","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n a = l[1]\n return reverse_list(l[1:]).append(a)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":22442,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:02:59","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n a = l[0]\n return reverse_list(l[1:]).append(a)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":41742,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:06:52","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":4497,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:06:52","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":10781,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:36:19","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":9613,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:42:08","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":14517,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:42:08","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":6397,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:42:12","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n return minimum(l[1:])\n else:\n return minimum(l[0] + l[2:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":11315,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:42:36","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n return minimum(l[1:])\n else:\n return minimum([l[0]] + l[2:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":7475,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:42:36","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n return minimum(l[1:])\n else:\n return minimum([l[0]] + l[2:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":41554,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:48:15","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n return maximum(l[1:])\n else:\n return maximum([l[0]] + l[2:])","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":38255,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:48:15","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n return maximum(l[1:])\n else:\n return maximum([l[0]] + l[2:])","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":20079,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 19:00:05","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[i], a[p] = a[p], a[i]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":33640,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 19:00:17","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[i], a[p] = a[p], a[i]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17296,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 19:00:17","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[i], a[p] = a[p], a[i]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":33214,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:07:58","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":37063,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:07:58","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":33492,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:09:44","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":14163,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:09:44","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":40240,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:12:28","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:12:28","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5808,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:15:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":41338,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:15:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":34644,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:19:28","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":5426,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:19:28","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":32882,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:23:24","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":681,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:23:24","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":17503,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:25:06","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":4164,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:25:06","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":14748,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:25:06","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":41776,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 19:35:53","func_code":"def partition(a, start, end):\n j = q = start\n while j < end:\n if a[j] < a[end]:\n a[j], a[q] = a[q], a[j]\n q += 1\n j += 1\n a[end], a[q] = a[q], a[end]\n return q\n\n\ndef quicksort(a, start, end):\n if end <= start:\n return\n q = partition(a, start, end)\n quicksort(a, start, q - 1)\n quicksort(a, q + 1, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":32668,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 19:35:53","func_code":"def partition(a, start, end):\n j = q = start\n while j < end:\n if a[j] < a[end]:\n a[j], a[q] = a[q], a[j]\n q += 1\n j += 1\n a[end], a[q] = a[q], a[end]\n return q\n\n\ndef quicksort(a, start, end):\n if end <= start:\n return\n q = partition(a, start, end)\n quicksort(a, start, q - 1)\n quicksort(a, q + 1, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":41217,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 19:35:53","func_code":"def partition(a, start, end):\n j = q = start\n while j < end:\n if a[j] < a[end]:\n a[j], a[q] = a[q], a[j]\n q += 1\n j += 1\n a[end], a[q] = a[q], a[end]\n return q\n\n\ndef quicksort(a, start, end):\n if end <= start:\n return\n q = partition(a, start, end)\n quicksort(a, start, q - 1)\n quicksort(a, q + 1, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":29047,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:23:48","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n if n[0] < n[1]:\n n.remove(n[1])\n else:\n n.remove(n[0])\n return minimum(n)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":27140,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:23:48","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n if n[0] < n[1]:\n n.remove(n[1])\n else:\n n.remove(n[0])\n return minimum(n)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":12175,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:29:37","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n if n[0] > n[1]:\n n.remove(n[1])\n else:\n n.remove(n[0])\n return maximum(n)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":32880,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:29:37","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n if n[0] > n[1]:\n n.remove(n[1])\n else:\n n.remove(n[0])\n return maximum(n)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":28826,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:38:19","func_code":"def count_letters(s):\n if len(s) == 0:\n return 0\n s = list(s)\n s.remove(s[0])\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":30570,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:38:19","func_code":"def count_letters(s):\n if len(s) == 0:\n return 0\n s = list(s)\n s.remove(s[0])\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":41232,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:40:31","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n a = l[-1]\n a.pop()\n return [a] + reverse_list(l)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":14485,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 21:48:57","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n a = l[-1]\n l.pop()\n return [a] + reverse_list(l)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":24150,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 21:48:57","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n a = l[-1]\n l.pop()\n return [a] + reverse_list(l)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":19261,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:10:56","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":26535,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:10:56","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":32143,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:30:28","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":14458,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:30:28","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":14852,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:33:08","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":30810,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:33:08","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":29352,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:33:08","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35416,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 10:31:20","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n if n[0] < n[1]:\n n.remove(n[1])\n return minimum(n)\n else:\n n.remove(n[0])\n return minimum(n)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":6624,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 10:31:20","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n if n[0] < n[1]:\n n.remove(n[1])\n return minimum(n)\n else:\n n.remove(n[0])\n return minimum(n)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":19796,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 10:33:05","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n if n[0] > n[1]:\n n.remove(n[1])\n return maximum(n)\n else:\n n.remove(n[0])\n return maximum(n)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":615,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 10:33:05","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n if n[0] > n[1]:\n n.remove(n[1])\n return maximum(n)\n else:\n n.remove(n[0])\n return maximum(n)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":17138,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:24:22","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":23080,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:24:22","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":29689,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:29:09","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":9535,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:29:09","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":20018,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:33:47","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":9125,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:33:47","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":20499,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 12:34:39","func_code":"def fibonacci(h):\n if h == 0 or h == 1:\n return 1\n return fibonacci(h - 1) + fibonacci(h - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":19074,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 12:34:39","func_code":"def fibonacci(h):\n if h == 0 or h == 1:\n return 1\n return fibonacci(h - 1) + fibonacci(h - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":18737,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:36:41","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":31184,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:36:41","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":8634,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:39:09","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":38963,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:39:09","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":40399,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:44:20","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":552,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:44:20","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":41743,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:47:49","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":32180,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:50:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5523,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:50:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35391,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:50:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":32267,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:00:19","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":27279,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:01:59","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":33727,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:01:59","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":998,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:11:40","func_code":"def selectionsort(A, p, r):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":6232,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:12:36","func_code":"def selectionsort(A):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8228,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:16:08","func_code":"def selectionsort(A):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":403,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:17:52","func_code":"def selectionsort(A):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":28201,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:18:10","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":42181,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:18:10","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28180,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:18:10","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":31291,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 14:01:57","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":41586,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 14:01:57","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":14685,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 14:02:48","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":2862,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 14:02:48","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":24883,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:36:13","func_code":"def minimum(l):\n if l == []:\n return []\n temp = minimum(l[1:])\n if len(temp) == 0 or l[0] > temp[0]:\n temp = [l[0]]\n return temp[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":33669,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:36:44","func_code":"def minimum(l):\n if l == []:\n return []\n temp = minimum(l[1:])\n if len(temp) == 0 or l[0] > temp[0]:\n temp = [l[0]]\n return temp[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":25173,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:37:10","func_code":"def minimum(l):\n if l == []:\n return []\n temp = minimum(l[1:])\n print(temp)\n if len(temp) == 0 or l[0] > temp[0]:\n temp = [l[0]]\n return temp[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":2277,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:37:41","func_code":"def minimum(l):\n if l == []:\n return []\n temp = minimum(l[1:])\n if l[0] > temp[0]:\n temp = [l[0]]\n return temp[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":26741,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:46:17","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n\ndef partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef minimum(l):\n\n def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n return quicksort(l, 0, len(l) - 1)[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":30047,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:46:51","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n\ndef partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef minimum(l):\n\n def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n quicksort(l, 0, len(l) - 1)\n return l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":39622,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:46:51","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n\ndef partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef minimum(l):\n\n def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n quicksort(l, 0, len(l) - 1)\n return l[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":5635,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:48:05","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n\ndef partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef maximum(l):\n\n def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n quicksort(l, 0, len(l) - 1)\n return l[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":12768,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:48:05","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n\ndef partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef maximum(l):\n\n def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n quicksort(l, 0, len(l) - 1)\n return l[-1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":1651,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:02:21","func_code":"def selectionsort(a):\n j = 0\n i = 1\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":14784,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:03:57","func_code":"def count_letters(s):\n if s == '':\n return 0\n s = s[1:]\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":12729,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:03:57","func_code":"def count_letters(s):\n if s == '':\n return 0\n s = s[1:]\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":7463,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:06:06","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p, j = i, i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":38342,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:06:06","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p, j = i, i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":29108,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-27 15:06:48","func_code":"def partition(A, p, r):\n q = j = p\n while j > r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j > r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":27705,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:06:53","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":20942,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:07:10","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":29945,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:07:10","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":25552,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-27 15:07:54","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":19597,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-27 15:07:54","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":17288,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:18:21","func_code":"def minimum(a, minimum=None):\n if not a:\n return minimum\n test = a.pop()\n if test < minimum or minimum == None:\n return minimum(a, test)\n else:\n return minimum(a, minimum)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":24455,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:18:57","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":22217,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:18:57","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":38170,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:19:08","func_code":"def minimum(a, minimum=0):\n if not a:\n return minimum\n test = a.pop()\n if test < minimum or minimum == 0:\n return minimum(a, test)\n else:\n return minimum(a, minimum)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":4657,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:20:28","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":40388,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:20:28","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":31861,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:21:34","func_code":"def minimum(a, minimum=0):\n if not a:\n return minimum\n test = a.pop()\n if test < minimum or minimum == 0:\n return minimum(a, test)\n return minimum(a, minimum)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":644,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:22:01","func_code":"def minimum(a, minimum=0):\n if not a:\n return minimum\n test = int(a.pop())\n if test < minimum or minimum == 0:\n return minimum(a, test)\n return minimum(a, minimum)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":35362,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:22:50","func_code":"def minimum(a, minimum=0):\n if not a:\n return minimum\n test = str(a.pop())\n if int(test) < int(minimum) or int(minimum) == 0:\n return minimum(a, int(test))\n return minimum(a, int(minimum))","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":16831,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:23:10","func_code":"def minimum(a, minimum=0):\n if not a:\n return minimum\n test = str(a.pop())\n if int(test) < int(minimum) or int(minimum) == 0:\n return minimum(a, test)\n return minimum(a, minimum)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":23693,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:23:40","func_code":"def selectionsort(l):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return l","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":20432,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:24:21","func_code":"def minimum(a, mini=0):\n if not a:\n return mini\n test = a.pop()\n if test < mini or mini == 0:\n return minimum(a, test)\n return minimum(a, mini)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":2483,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:24:21","func_code":"def minimum(a, mini=0):\n if not a:\n return mini\n test = a.pop()\n if test < mini or mini == 0:\n return minimum(a, test)\n return minimum(a, mini)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":9058,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:25:55","func_code":"def maximum(a, high=0):\n if not a:\n return high\n test = a.pop()\n if test > high or high == 0:\n return maximum(a, test)\n return maximum(a, high)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":26982,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:25:55","func_code":"def maximum(a, high=0):\n if not a:\n return high\n test = a.pop()\n if test > high or high == 0:\n return maximum(a, test)\n return maximum(a, high)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":13122,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:27:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":9701,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:27:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":18154,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:27:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":29384,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:31:33","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n else:\n minimum_ret = minimum(n[1:])\n return n[0] if n[0] < minimum_ret else minimum_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":15513,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:31:33","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n else:\n minimum_ret = minimum(n[1:])\n return n[0] if n[0] < minimum_ret else minimum_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":5049,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:37:15","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n else:\n maxim = maximum(n[1:])\n return n[0] if n[0] > maxim else maxim","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":11902,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:37:15","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n else:\n maxim = maximum(n[1:])\n return n[0] if n[0] > maxim else maxim","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":21989,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 15:39:22","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":38397,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 15:39:22","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":38563,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:40:00","func_code":"def count_letters(n):\n if n == '':\n return 0\n else:\n return 1 + count_letters(n[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":30019,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:46:28","func_code":"def count_letters(n):\n if n == '':\n return 0\n else:\n return 1 + count_letters(n[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":10669,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:46:28","func_code":"def count_letters(n):\n if n == '':\n return 0\n else:\n return 1 + count_letters(n[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":15639,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:50:42","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":11555,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:50:42","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":21431,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:56:39","func_code":"def fibonacci(i):\n if i <= 1:\n return 1\n else:\n return fibonacci(i - 1) + fibonacci(i - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":6456,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:56:39","func_code":"def fibonacci(i):\n if i <= 1:\n return 1\n else:\n return fibonacci(i - 1) + fibonacci(i - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":27982,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 16:03:33","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":2518,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 16:03:33","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":1207,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:03:51","func_code":"def quicksort(a, start, end):\n if end - start < 1:\n return\n i = k = start\n while i <= end:\n if a[i] <= a[end]:\n a[i], a[k] = a[k], a[i]\n k = k + 1\n i = i + 1","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":17669,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:04:51","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":7318,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:04:51","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":4653,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:04:52","func_code":"def quicksort(a, start, end):\n if end - start < 1:\n return\n i = k = start\n while i <= end:\n if a[i] <= a[end]:\n a[i], a[k] = a[k], a[i]\n k = k + 1\n i = i + 1\n quicksort(a, start, k - 2)\n quicksort(a, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":34786,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:05:08","func_code":"def quicksort(a, start, end):\n if end - start < 1:\n return\n i = k = start\n while i <= end:\n if a[i] <= a[end]:\n a[i], a[k] = a[k], a[i]\n k = k + 1\n i = i + 1\n quicksort(a, start, k - 2)\n quicksort(a, k, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":42186,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:05:08","func_code":"def quicksort(a, start, end):\n if end - start < 1:\n return\n i = k = start\n while i <= end:\n if a[i] <= a[end]:\n a[i], a[k] = a[k], a[i]\n k = k + 1\n i = i + 1\n quicksort(a, start, k - 2)\n quicksort(a, k, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":6938,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:07:24","func_code":"def count_letters(n):\n if n == '':\n return 0\n else:\n return count_letters(n[1:]) + 1","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":34057,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:07:24","func_code":"def count_letters(n):\n if n == '':\n return 0\n else:\n return count_letters(n[1:]) + 1","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":37363,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:08:43","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = ij = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":22456,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:09:31","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17541,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:09:31","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25910,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:09:31","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":10852,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:09:58","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n else:\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":12455,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:09:58","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n else:\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":508,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:13:25","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q = q + 1\n j = j + 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q = q + 1\n j = j + 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":25249,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:13:25","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q = q + 1\n j = j + 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q = q + 1\n j = j + 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":7203,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 16:15:14","func_code":"def selectionsort(A):\n for h in range(len(A)):\n min_i = h\n for i in range(h, len(A)):\n if A[i] < A[min_i]:\n min_i = i\n A[h], A[min_i] = A[min_i], A[h]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":2421,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 16:15:14","func_code":"def selectionsort(A):\n for h in range(len(A)):\n min_i = h\n for i in range(h, len(A)):\n if A[i] < A[min_i]:\n min_i = i\n A[h], A[min_i] = A[min_i], A[h]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":16641,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 16:15:14","func_code":"def selectionsort(A):\n for h in range(len(A)):\n min_i = h\n for i in range(h, len(A)):\n if A[i] < A[min_i]:\n min_i = i\n A[h], A[min_i] = A[min_i], A[h]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":19898,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:17:31","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[i]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21744,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:20:22","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] > A[i]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":2340,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:23:42","func_code":"def selectionsort(A):\n for h in range(len(A)):\n mini = h\n for i in range(h, len(A)):\n if A[i] < A[mini]:\n mini = i\n A[h], A[mini] = A[mini], A[h]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":40768,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:23:42","func_code":"def selectionsort(A):\n for h in range(len(A)):\n mini = h\n for i in range(h, len(A)):\n if A[i] < A[mini]:\n mini = i\n A[h], A[mini] = A[mini], A[h]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":10298,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:23:42","func_code":"def selectionsort(A):\n for h in range(len(A)):\n mini = h\n for i in range(h, len(A)):\n if A[i] < A[mini]:\n mini = i\n A[h], A[mini] = A[mini], A[h]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14322,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:39:15","func_code":"def fibonacci(n):\n if n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":13038,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:39:58","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":25205,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:40:28","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":5040,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:40:28","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":29044,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:44:06","func_code":"def parition(a, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n else:\n q = parition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":20344,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:44:43","func_code":"def parition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n else:\n q = parition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":42388,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:45:56","func_code":"def parition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n else:\n q = parition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":3485,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:45:56","func_code":"def parition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n else:\n q = parition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":37924,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:45:56","func_code":"def parition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n else:\n q = parition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":26680,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-04-27 16:46:56","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":12730,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-04-27 16:46:56","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":1703,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:47:00","func_code":"def search(str, letter):\n if str[i] == '':\n return False\n elif str[0] == letter:\n return True\n else:\n search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":39062,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:47:00","func_code":"def fibonacci(n):\n if n == n - 1 + (n - 2):\n return n\n else:\n fibonacci(n + 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":18297,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:47:00","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":8132,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def fibonacci(n):\n if n == n - 1 + (n - 2):\n return n\n else:\n fibonacci(n + 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":27586,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":38573,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":40786,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":15273,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":11596,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def fibonacci(n):\n if n == n - 1 + (n - 2):\n return n\n else:\n fibonacci(n + 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":6880,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":1063,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":false} -{"submission_id":4529,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def fibonacci(n):\n if n == n - 1 + (n - 2):\n return n\n else:\n fibonacci(n + 1)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":26847,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:08:44","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":25465,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:08:44","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":2064,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:08:51","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":26898,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:08:51","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":25829,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:09:06","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":13831,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:09:06","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":2325,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:09:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":15520,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:09:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14139,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:09:18","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":32056,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:09:18","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":24304,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-27 18:11:05","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":14808,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-27 18:11:05","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":41170,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-27 18:36:18","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[i], a[p] = a[p], a[i]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":29331,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-27 18:36:18","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[i], a[p] = a[p], a[i]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39710,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-27 18:36:18","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[i], a[p] = a[p], a[i]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":7838,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 21:17:24","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":6200,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 21:17:24","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":1923,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 21:17:33","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":39728,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 21:17:33","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":41253,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 22:26:53","func_code":"def quicksort(A, beg, end):\n if end - beg < 1:\n return\n i = j = beg\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, beg, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":40404,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 22:26:53","func_code":"def quicksort(A, beg, end):\n if end - beg < 1:\n return\n i = j = beg\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, beg, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":5219,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 22:27:04","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28679,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 22:27:04","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":34397,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 22:27:04","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14939,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 02:29:26","func_code":"def swap_first_last(a, first, last):\n if first >= last:\n return\n a[first], a[last] = a[last], a[first]\n first += 1\n last -= 1\n swap_first_last(a, first, last)\n\n\ndef reverse_list(a):\n swap_first_last(a, 0, len(a) - 1)\n return a","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":23484,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 02:29:26","func_code":"def swap_first_last(a, first, last):\n if first >= last:\n return\n a[first], a[last] = a[last], a[first]\n first += 1\n last -= 1\n swap_first_last(a, first, last)\n\n\ndef reverse_list(a):\n swap_first_last(a, 0, len(a) - 1)\n return a","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":38080,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 02:43:32","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":39390,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 02:43:32","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":2902,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 02:45:28","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":19302,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 02:45:28","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":21598,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-28 10:12:22","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":23204,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-28 10:13:56","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":30243,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-28 10:13:56","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":14300,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-28 10:13:56","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":10134,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 10:44:00","func_code":"def minimum(a):\n i = 1\n s = a[0]\n while i < len(a):\n if s > a[i]:\n s = a[i]\n i = i + 1\n return s","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":14306,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 10:44:00","func_code":"def minimum(a):\n i = 1\n s = a[0]\n while i < len(a):\n if s > a[i]:\n s = a[i]\n i = i + 1\n return s","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":31237,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 10:52:57","func_code":"def maximum(a):\n a = sorted(a)\n return a[len(a) - 1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":40187,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 10:52:57","func_code":"def maximum(a):\n a = sorted(a)\n return a[len(a) - 1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":10572,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:06:04","func_code":"def count_letters(a):\n if a == '':\n return 0\n a = a[:-1]\n n = 1\n return n + count_letters(a)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":22519,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:06:04","func_code":"def count_letters(a):\n if a == '':\n return 0\n a = a[:-1]\n n = 1\n return n + count_letters(a)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":41299,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:28:39","func_code":"def reverse_list(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a.pop())\n i = i + 1\n return b","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":741,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:28:39","func_code":"def reverse_list(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a.pop())\n i = i + 1\n return b","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":20982,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:33:52","func_code":"def fibonacci(a):\n if a == 0 or a == 1:\n return 1\n return fibonacci(a - 1) + fibonacci(a - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":41032,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:33:52","func_code":"def fibonacci(a):\n if a == 0 or a == 1:\n return 1\n return fibonacci(a - 1) + fibonacci(a - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":14591,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:33:54","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":5843,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:33:54","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":9884,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:34:41","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":26709,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:34:41","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":869,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:35:37","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":42478,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:35:37","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":410,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:37:50","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38821,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:37:50","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":12333,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:38:13","func_code":"def minimum(lis, p=0):\n if lis == []:\n return p\n n = pop(lis)\n if n > p:\n p = n\n return minimum(lis)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":26519,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:38:27","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":33064,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:38:27","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":19613,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:38:36","func_code":"def minimum(lis, p=0):\n if lis == []:\n return p\n n = lis.pop()\n if n > p:\n p = n\n return minimum(lis)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":7207,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:39:04","func_code":"def minimum(lis, p=0):\n if lis == []:\n return p\n n = lis.pop()\n if n > p:\n p = n\n return minimum(lis, p)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":35090,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:40:13","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":21702,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:40:13","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":23798,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:40:47","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":27487,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:40:47","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":1140,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:44:15","func_code":"def minimum(lis, p=100000000000000000000000000000000000000000000):\n if lis == []:\n return p\n n = lis.pop()\n if n < p:\n p = n\n return minimum(lis, p)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":38261,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:44:15","func_code":"def minimum(lis, p=100000000000000000000000000000000000000000000):\n if lis == []:\n return p\n n = lis.pop()\n if n < p:\n p = n\n return minimum(lis, p)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":2861,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:45:33","func_code":"def maximum(lis, p=0):\n if lis == []:\n return p\n n = lis.pop()\n if n > p:\n p = n\n return minimum(lis, p)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":3832,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:45:49","func_code":"def maximum(lis, p=0):\n if lis == []:\n return p\n n = lis.pop()\n if n > p:\n p = n\n return maximum(lis, p)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":9518,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:45:49","func_code":"def maximum(lis, p=0):\n if lis == []:\n return p\n n = lis.pop()\n if n > p:\n p = n\n return maximum(lis, p)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":36153,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:50:18","func_code":"def count_letters(s, c=0):\n if s == '':\n return c\n s = s[1:]\n c = c + 1\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":14251,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:50:37","func_code":"def count_letters(s, c=0):\n if s == '':\n return c\n s = s[1:]\n c = c + 1\n return count_letters(s, c)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":34720,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:50:37","func_code":"def count_letters(s, c=0):\n if s == '':\n return c\n s = s[1:]\n c = c + 1\n return count_letters(s, c)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":6427,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:52:17","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":2481,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:52:17","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":34440,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:57:52","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28604,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:57:52","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5811,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-28 11:59:10","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":11727,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-28 11:59:10","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":17121,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 13:07:32","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":34940,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 13:07:32","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":17151,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 13:57:48","func_code":"def fibonacci(n):\n if n == 0 or n == 1 or n == 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":1584,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 13:58:03","func_code":"def fibonacci(n):\n if n == 0 or n == 1 or n == 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":32413,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 14:14:13","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":34993,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 14:14:27","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":34390,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 14:14:27","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":27292,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:33:46","func_code":"def minimum(l):\n min = inf\n for item in l:\n min = item if item < min else min\n return min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":2504,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:34:22","func_code":"def minimum(l):\n min = None\n for item in l:\n min = item if min == None or item < min else min\n return min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":38645,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:35:03","func_code":"def maximum(l):\n min = None\n for item in l:\n min = item if min == None or item > min else min\n return min","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":9150,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:35:42","func_code":"def maximum(l):\n max = None\n for item in l:\n max = item if max == None or item > max else max\n return max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":14802,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:38:17","func_code":"def maximum(l, old_max=None):\n item = l[0]\n if item != None:\n new_l = l[1:]\n maximum(new_l, item if old_max == None or item > old_max else old_max)\n else:\n return old_max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":36796,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:39:28","func_code":"_A = None\n\n\ndef maximum(l, old_max=_A):\n try:\n item = l[0]\n except IndexError:\n item = _A\n if item is not _A:\n new_l = l[1:]\n maximum(new_l, item if old_max == _A or item > old_max else old_max)\n else:\n return old_max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":false} -{"submission_id":40750,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:40:52","func_code":"_A = None\n\n\ndef maximum(l, old_max=_A):\n try:\n item = l[0]\n except IndexError:\n item = _A\n if item is not _A:\n new_l = l[1:]\n return maximum(new_l, item if old_max == _A or item > old_max else\n old_max)\n else:\n return old_max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":32786,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:40:52","func_code":"_A = None\n\n\ndef maximum(l, old_max=_A):\n try:\n item = l[0]\n except IndexError:\n item = _A\n if item is not _A:\n new_l = l[1:]\n return maximum(new_l, item if old_max == _A or item > old_max else\n old_max)\n else:\n return old_max","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":32559,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:41:29","func_code":"_A = None\n\n\ndef minimum(l, old_min=_A):\n try:\n item = l[0]\n except IndexError:\n item = _A\n if item is not _A:\n new_l = l[1:]\n return minimum(new_l, item if old_min == _A or item < old_min else\n old_min)\n else:\n return old_min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":39712,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:41:29","func_code":"_A = None\n\n\ndef minimum(l, old_min=_A):\n try:\n item = l[0]\n except IndexError:\n item = _A\n if item is not _A:\n new_l = l[1:]\n return minimum(new_l, item if old_min == _A or item < old_min else\n old_min)\n else:\n return old_min","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":9361,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:45:49","func_code":"def count_letters(item, length=0):\n try:\n item[0]\n except IndexError:\n return length\n item = item[1:]\n length += 1\n return count_letters(item, length)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":5817,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:45:49","func_code":"def count_letters(item, length=0):\n try:\n item[0]\n except IndexError:\n return length\n item = item[1:]\n length += 1\n return count_letters(item, length)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":28534,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:50:37","func_code":"def reverse_list(l, new_l=None):\n if new_l is None:\n new_l = []\n if len(l) > 0:\n i = l[0]\n l = l[1:]\n new_l = [i] + new_l\n return reverse_list(l, new_l)\n else:\n return new_l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":18130,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:50:37","func_code":"def reverse_list(l, new_l=None):\n if new_l is None:\n new_l = []\n if len(l) > 0:\n i = l[0]\n l = l[1:]\n new_l = [i] + new_l\n return reverse_list(l, new_l)\n else:\n return new_l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":19287,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:53:48","func_code":"def fibonacci(n):\n return n if n < 2 else fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":22240,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:54:05","func_code":"def fibonacci(n):\n return 1 if n < 2 else fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":38300,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:54:05","func_code":"def fibonacci(n):\n return 1 if n < 2 else fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":16093,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:12:23","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":1473,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:12:23","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":25533,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:13:11","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":24653,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:13:11","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":24268,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:16:25","func_code":"def fibonacci(s):\n if s == 0:\n return 1\n else:\n return fibonacci(s - 1) + fibonacci(s + 5)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":28186,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:16:52","func_code":"def fibonacci(s):\n if s == 0:\n return 1\n else:\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":20869,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:17:32","func_code":"def fibonacci(s):\n if s <= 1:\n return 1\n else:\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":36574,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:17:32","func_code":"def fibonacci(s):\n if s <= 1:\n return 1\n else:\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":9744,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:25:06","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":18481,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:25:06","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":14870,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:26:23","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":22618,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:26:23","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":12789,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:26:51","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":22946,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:26:51","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":2377,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:27:53","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":11906,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:27:53","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":40068,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:27:53","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":9351,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-04-28 15:43:46","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":21694,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-04-28 15:43:46","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":29502,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-04-28 15:45:20","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":35765,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-04-28 15:45:20","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":14603,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:00:47","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":31146,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:00:47","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":11946,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:05:38","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":33561,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:05:38","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":25211,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:23:17","func_code":"def minimum(l):\n return sorted(l)[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":32535,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:23:17","func_code":"def minimum(l):\n return sorted(l)[0]","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":25701,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:24:54","func_code":"def maximum(l):\n return sorted(l)[len(l) - 1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":15989,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:24:54","func_code":"def maximum(l):\n return sorted(l)[len(l) - 1]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":37722,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:29:15","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":30509,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:29:15","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":9396,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:31:18","func_code":"def count_letters(s):\n length = 0\n for i in s:\n length += 1\n return length","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":15612,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:31:18","func_code":"def count_letters(s):\n length = 0\n for i in s:\n length += 1\n return length","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":35426,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:36:09","func_code":"def reverse_list(l):\n new_l = []\n sortedl = [i for i in sorted[l]]\n for i in range(len(l)):\n new_l += sortedl[len(l) - i - 1]","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":27374,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 16:36:25","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = 0\n while j < len(a):\n if a[j] > a[i]:\n a[i], a[j] = a[j], a[i]\n j += 1\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41097,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 16:36:25","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = 0\n while j < len(a):\n if a[j] > a[i]:\n a[i], a[j] = a[j], a[i]\n j += 1\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":12221,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 16:36:25","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = 0\n while j < len(a):\n if a[j] > a[i]:\n a[i], a[j] = a[j], a[i]\n j += 1\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":245,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:36:48","func_code":"def reverse_list(l):\n new_l = []\n sortedl = [i for i in sorted[l]]\n for i in range(len(l)):\n new_l += sortedl[len(l) - i - 1]\n return new_l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":31318,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:38:17","func_code":"def reverse_list(l):\n new_l = []\n sortedl = [i for i in sorted(l)]\n for i in range(len(l)):\n new_l += sortedl[len(l) - i - 1]\n return new_l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":6857,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:39:21","func_code":"def reverse_list(l):\n new_l = []\n sortedl = [i for i in sorted(l)]\n for i in range(len(l)):\n new_l.append(sortedl[len(l) - i - 1])\n return new_l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":35559,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:42:01","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n new_l = []\n sortedl = [i for i in sorted(l)]\n for i in range(len(l)):\n new_l.append(sortedl[len(l) - i - 1])\n return new_l","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":36364,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:47:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":42282,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:47:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":1502,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:53:16","func_code":"def fibonacci(n):\n if n == 0 or n == 1 or n == 2:\n return 1\n else:\n return n - 1 + (n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":13443,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:53:57","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return n - 1 + (n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":34811,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:54:23","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":16335,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:54:23","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":22575,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:56:12","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":13518,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:56:12","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":11398,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:05:07","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":33354,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:05:07","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":22458,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:12:53","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":11766,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:12:53","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":31100,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-28 17:15:17","func_code":"def count_letters(s):\n if not s:\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":30513,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-28 17:15:17","func_code":"def count_letters(s):\n if not s:\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":24185,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:15:36","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":17835,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:15:36","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":5179,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:19:20","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":42320,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:19:26","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":29811,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:19:26","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":16078,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:19:35","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":39793,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:19:35","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":8628,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:20:18","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":24576,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:20:18","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":2370,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:21:03","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":32296,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:21:03","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":4119,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:21:06","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":18428,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:21:06","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":15446,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:22:20","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":38155,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:22:20","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":22607,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:26:02","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":26980,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:26:02","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28524,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:26:02","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":27046,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-28 17:32:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":16146,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-28 17:32:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":15303,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-28 17:32:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":17585,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 17:39:32","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":19113,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 17:39:32","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":3379,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 17:41:26","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":27564,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 17:41:26","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17574,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 17:41:26","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35720,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-28 18:01:20","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":8361,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-28 18:01:20","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":19058,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:12:02","func_code":"def fibonacci(n):\n if n == 1:\n return 1\n elif n == 2:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":33326,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:14:14","func_code":"def fibonacci(n):\n if n == 1:\n return 1\n elif n == 2:\n return 1\n elif n > 2:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":2209,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:15:02","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n elif n >= 2:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":35589,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:15:31","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":29602,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:15:31","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":12298,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:19:44","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":5940,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:19:44","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":5384,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:19:44","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":39461,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:09:52","func_code":"def minimum(a):\n if len(a) == 1:\n return a\n b = max(a)\n a.replace(b, '')\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":28618,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:11:11","func_code":"def minimum(a):\n if len(a) == 1:\n return a\n b = max(a)\n a = [c for c in a if c != b]\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":40125,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:11:42","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n b = max(a)\n a = [c for c in a if c != b]\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":31655,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:11:42","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n b = max(a)\n a = [c for c in a if c != b]\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":23681,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:13:53","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n b = min(a)\n a = [c for c in a if c != b]\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":9307,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:13:53","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n b = min(a)\n a = [c for c in a if c != b]\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":26326,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:20:50","func_code":"def count_letters(s):\n total = 0\n if s == '':\n return total\n total += 1\n s = s[:-2]\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":34933,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:21:13","func_code":"def count_letters(s):\n total = 0\n if s == '':\n return total\n total += 1\n s = s[:-2]\n print(s)\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":38175,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:21:47","func_code":"def count_letters(s):\n total = 0\n if s == '':\n return total\n total += 1\n s = s[:-1]\n print(s)\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":6873,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:22:12","func_code":"def count_letters(s):\n total = 0\n if s == '':\n return total\n total += 1\n print(total)\n s = s[:-1]\n print(s)\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":9045,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:22:44","func_code":"def count_letters(s):\n if s == '':\n return total\n total += 1\n print(total)\n s = s[:-1]\n print(s)\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":7192,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:23:28","func_code":"def count_letters(s):\n if s == '':\n return total\n total += 1\n s = s[:-1]\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":30463,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:25:42","func_code":"def count_letters(s):\n total = 0\n if s == '':\n return total\n for t in s:\n total += 1\n s = ''\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":16784,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:26:09","func_code":"def count_letters(s):\n total = 0\n if s == '':\n return total\n for t in s:\n total += 1\n print(total)\n s = ''\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":37401,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:26:49","func_code":"def count_letters(s):\n if s == '':\n return total\n for t in s:\n total = 0\n total += 1\n print(total)\n s = ''\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":36284,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:27:26","func_code":"def count_letters(s):\n for t in s:\n total = 0\n total += 1\n if s == '':\n return total\n s = ''\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":8937,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:18:14","func_code":"def count_letters(s):\n try:\n if s == '':\n return b\n except IndexError:\n return 0\n b = s.index(s[-1])\n s = ''\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":23935,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:19:54","func_code":"def count_letters(s):\n b = s.index(s[-1])\n s = ''\n try:\n if s == '':\n return b\n except IndexError:\n return 0\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":21110,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:20:14","func_code":"def count_letters(s):\n b = s.index(s[-1]) + 1\n s = ''\n try:\n if s == '':\n return b\n except IndexError:\n return 0\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":26953,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:21:02","func_code":"def count_letters(s):\n try:\n b = s.index(s[-1]) + 1\n except IndexError:\n return 0\n s = ''\n if s == '':\n return b\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":13869,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:52:13","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":11089,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:53:18","func_code":"def count_letters(s):\n n = 0\n print(s)\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":20688,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:53:44","func_code":"def minimum(l):\n biggest = l[0]\n for c in l:\n if c < biggest:\n biggest = c\n return biggest","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":38011,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:53:44","func_code":"def minimum(l):\n biggest = l[0]\n for c in l:\n if c < biggest:\n biggest = c\n return biggest","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":24944,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:55:10","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":8484,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:55:14","func_code":"def maximum(l):\n biggest = l[0]\n for c in l:\n if c > biggest:\n biggest = c\n return biggest","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":31502,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:55:14","func_code":"def maximum(l):\n biggest = l[0]\n for c in l:\n if c > biggest:\n biggest = c\n return biggest","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":22852,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:55:55","func_code":"def count_letters(s):\n n = 0\n print(n)\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":39619,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:57:03","func_code":"def count_letters(s):\n n = 0\n print(n)\n if not s:\n return 0\n else:\n n += 1\n print(n)\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":4179,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:57:27","func_code":"def count_letters(s):\n n = 0\n print(n)\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":25013,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:57:36","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":1522,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:57:36","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":37696,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:57:50","func_code":"def count_letters(s):\n counter = 0\n if s == '':\n return 0\n else:\n for c in s:\n counter += 1\n return counter","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":4096,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:57:50","func_code":"def count_letters(s):\n counter = 0\n if s == '':\n return 0\n else:\n for c in s:\n counter += 1\n return counter","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":15262,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:04:44","func_code":"def reverse_list(l):\n l2 = []\n i = 0\n while l:\n l2.append(l[len(l) - i - 1])\n tmp = l.pop()\n return l2","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":22551,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:04:44","func_code":"def reverse_list(l):\n l2 = []\n i = 0\n while l:\n l2.append(l[len(l) - i - 1])\n tmp = l.pop()\n return l2","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":14541,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-28 21:08:51","func_code":"def count_letters(m):\n if m == '':\n return 0\n else:\n return 1 + count_letters(m[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":5786,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-28 21:08:51","func_code":"def count_letters(m):\n if m == '':\n return 0\n else:\n return 1 + count_letters(m[:-1])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":38347,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:10:33","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":7936,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:10:33","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":37742,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:17:08","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += j\n a[p], a[i] = a[i], a[p]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":22986,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:19:42","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += j\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":21961,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:29:27","func_code":"def minimum(l, m=None):\n if not len(l):\n return m\n if not m or l[0] < m:\n return minimum(l[1:], l[0])\n return minimum(l[1:], m)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":28876,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:29:27","func_code":"def minimum(l, m=None):\n if not len(l):\n return m\n if not m or l[0] < m:\n return minimum(l[1:], l[0])\n return minimum(l[1:], m)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":38391,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:32:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":6545,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:32:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41989,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:32:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20221,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:34:24","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":15237,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:34:24","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":40988,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:34:28","func_code":"def minimum(a):\n if len(a) == 1:\n return a[-1]\n elif a[0] < a[-1]:\n return minimum(a[:-1])\n elif a[0] > a[-1]:\n return minimum(a[1:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":29480,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:34:28","func_code":"def minimum(a):\n if len(a) == 1:\n return a[-1]\n elif a[0] < a[-1]:\n return minimum(a[:-1])\n elif a[0] > a[-1]:\n return minimum(a[1:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":12419,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:34:49","func_code":"def count_letters(s, c=0):\n if not s:\n return c\n return count_letters(s[:-1], c + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":37990,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:34:49","func_code":"def count_letters(s, c=0):\n if not s:\n return c\n return count_letters(s[:-1], c + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":21668,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:38:51","func_code":"def reverse_list(l, r=None):\n if not r:\n r = []\n if not l:\n return r\n r.append(l.pop())\n return reverse_list(l, r)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":17126,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:38:51","func_code":"def reverse_list(l, r=None):\n if not r:\n r = []\n if not l:\n return r\n r.append(l.pop())\n return reverse_list(l, r)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":21928,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:38:59","func_code":"def maximum(a):\n if len(a) == 1:\n return a[-1]\n elif a[0] > a[-1]:\n return maximum(a[:-1])\n elif a[0] < a[-1]:\n return maximum(a[1:])","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":21763,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:38:59","func_code":"def maximum(a):\n if len(a) == 1:\n return a[-1]\n elif a[0] > a[-1]:\n return maximum(a[:-1])\n elif a[0] < a[-1]:\n return maximum(a[1:])","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":24197,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:42:52","func_code":"def fibonacci(n, l=0, c=1):\n if not n:\n return c\n return fibonacci(n - 1, c, l + c)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":14752,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:42:52","func_code":"def fibonacci(n, l=0, c=1):\n if not n:\n return c\n return fibonacci(n - 1, c, l + c)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":33408,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:43:33","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":1599,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:46:02","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":4353,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:46:12","func_code":"def fibonacci(n):\n if n == (0 or 1):\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":14254,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:46:31","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":14432,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:46:31","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":34670,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:59:41","func_code":"def reverse_list(l, ding=None):\n if not ding:\n ding = []\n if not l:\n return ding\n ding.append(l.pop())\n return reverse_list(l, ding)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":18766,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 21:59:54","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":27608,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 21:59:54","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":18870,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:04","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":23473,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:04","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":34770,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:08","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":11813,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:14","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":12187,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:14","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":14921,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:18","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":14616,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:23","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":18073,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:23","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":14333,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:27","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":28167,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:27","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":27663,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:33","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":29005,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:33","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":30630,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":10729,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":37029,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":29383,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 22:06:16","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":16983,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 22:06:16","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":35213,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 22:07:03","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41737,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 22:07:03","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":7143,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 22:07:03","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17690,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:14:59","func_code":"def quicksort(l):\n if len(l) < 2:\n return l\n pivot = l[0]\n left = []\n right = []\n for n in l[1:]:\n if n < pivot:\n left.append(n)\n else:\n right.append(n)\n return quicksort(left) + [pivot] + quicksort(right)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":42257,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:15:22","func_code":"def quicksort(l):\n if len(l) < 2:\n return l\n pivot = l[0]\n left = []\n right = []\n for n in l[1:]:\n if n < pivot:\n left.append(n)\n else:\n right.append(n)\n return quicksort(left) + [pivot] + quicksort(right)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":25167,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:22:08","func_code":"def fibonacci(aaliyah, supercalifragilisticespialidotious=0, koppaberg=1):\n if not aaliyah:\n return koppaberg\n return fibonacci(aaliyah - 1, koppaberg, \n supercalifragilisticespialidotious + koppaberg)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":37788,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:22:08","func_code":"def fibonacci(aaliyah, supercalifragilisticespialidotious=0, koppaberg=1):\n if not aaliyah:\n return koppaberg\n return fibonacci(aaliyah - 1, koppaberg, \n supercalifragilisticespialidotious + koppaberg)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":6103,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:22:18","func_code":"def reverse_list(l, ding=None):\n if not ding:\n ding = []\n if not l:\n return ding\n ding.append(l.pop())\n return reverse_list(l, ding)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":33670,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:22:18","func_code":"def reverse_list(l, ding=None):\n if not ding:\n ding = []\n if not l:\n return ding\n ding.append(l.pop())\n return reverse_list(l, ding)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":3943,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:24:47","func_code":"def quicksort(cabbages):\n if len(l) < 2:\n return l\n pivot = l[0]\n left_side = []\n right_side = []\n for n in cabbages[1:]:\n if n < pivot:\n left_side.append(n)\n else:\n right_side.append(n)\n return quicksort(left_side) + [pivot] + quicksort(right_side)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":8379,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:25:41","func_code":"def quicksort(cabbages):\n if len(l) < 2:\n return l\n pivot = l[0]\n left_side = []\n right_side = []\n for n in cabbages[1:]:\n if n < pivot:\n left_side.append(n)\n else:\n right_side.append(n)\n return quicksort(left_side) + [pivot] + quicksort(right_side)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":16731,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:26:01","func_code":"def quicksort(l):\n if len(l) < 2:\n return l\n pivot = l[0]\n left = []\n right = []\n for n in l[1:]:\n if n < pivot:\n left.append(n)\n else:\n right.append(n)\n return quicksort(left) + [pivot] + quicksort(right)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":1979,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-28 22:26:10","func_code":"def quicksort(l, first, last):\n if first >= last:\n return\n i, j = first, last\n pivot = l[random.randint(first, last)]\n while i <= j:\n while l[i] < pivot:\n i += 1\n while l[j] > pivot:\n j -= 1\n if i <= j:\n l[i], l[j] = l[j], l[i]\n i, j = i + 1, j - 1\n quicksort(l, first, j)\n quicksort(l, i, last)\n return l","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":29079,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-28 22:26:10","func_code":"def quicksort(l, first, last):\n if first >= last:\n return\n i, j = first, last\n pivot = l[random.randint(first, last)]\n while i <= j:\n while l[i] < pivot:\n i += 1\n while l[j] > pivot:\n j -= 1\n if i <= j:\n l[i], l[j] = l[j], l[i]\n i, j = i + 1, j - 1\n quicksort(l, first, j)\n quicksort(l, i, last)\n return l","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":30017,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-28 22:26:10","func_code":"def quicksort(l, first, last):\n if first >= last:\n return\n i, j = first, last\n pivot = l[random.randint(first, last)]\n while i <= j:\n while l[i] < pivot:\n i += 1\n while l[j] > pivot:\n j -= 1\n if i <= j:\n l[i], l[j] = l[j], l[i]\n i, j = i + 1, j - 1\n quicksort(l, first, j)\n quicksort(l, i, last)\n return l","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":17210,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:34:56","func_code":"def quicksort(l, start=0, end=None):\n if len(l) < 2:\n return l\n pivot = l[0]\n left = []\n right = []\n for n in l[1:]:\n if n < pivot:\n left.append(n)\n else:\n right.append(n)\n return quicksort(left) + [pivot] + quicksort(right)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":11938,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:36:15","func_code":"def quicksort(l, start=0, end=None):\n if len(l) < 2:\n return l\n pivot = l[1]\n left = []\n right = []\n for n in l[1:]:\n if n < pivot:\n left.append(n)\n else:\n right.append(n)\n return quicksort(left) + [pivot] + quicksort(right)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":42471,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:43:18","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":31003,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:43:34","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":25923,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:43:49","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":25312,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:43:49","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":26406,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:47:00","func_code":"def selectionsort(l, o=None):\n if not o:\n o = []\n l = l[:]\n if not len(l):\n return o\n small = min(l)\n l.remove(small)\n o.append(small)\n return selectionsort(l, o)","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8029,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:53:59","func_code":"def selectionsort(l):\n for i in range(len(l)):\n j = i + 1\n p = i\n while j < len(l):\n if l[j] < l[p]:\n p = j\n j += 1\n l[p], l[i] = l[i], l[p]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38016,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:53:59","func_code":"def selectionsort(l):\n for i in range(len(l)):\n j = i + 1\n p = i\n while j < len(l):\n if l[j] < l[p]:\n p = j\n j += 1\n l[p], l[i] = l[i], l[p]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":1653,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:53:59","func_code":"def selectionsort(l):\n for i in range(len(l)):\n j = i + 1\n p = i\n while j < len(l):\n if l[j] < l[p]:\n p = j\n j += 1\n l[p], l[i] = l[i], l[p]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":7219,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:54:56","func_code":"def selectionsort(a):\n for i in range(len(a)):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25602,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:54:56","func_code":"def selectionsort(a):\n for i in range(len(a)):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":2447,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:55:17","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":14110,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:55:45","func_code":"def fibonacci(n, last=0, curr=1):\n if not n:\n return curr\n return fibonacci(n - 1, curr, last + curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":24994,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:55:45","func_code":"def fibonacci(n, last=0, curr=1):\n if not n:\n return curr\n return fibonacci(n - 1, curr, last + curr)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":17710,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:57:15","func_code":"def reverse_list(a, reverse=None):\n if not reverse:\n reverse = []\n if len(a) < 1:\n return reverse\n reverse.append(a.pop())\n return reverse_list(a, reverse)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":38061,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:57:15","func_code":"def reverse_list(a, reverse=None):\n if not reverse:\n reverse = []\n if len(a) < 1:\n return reverse\n reverse.append(a.pop())\n return reverse_list(a, reverse)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":18883,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:57:45","func_code":"def count_letters(s, count=0):\n if not s:\n return count\n return count_letters(s[:-1], count + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":7186,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:57:45","func_code":"def count_letters(s, count=0):\n if not s:\n return count\n return count_letters(s[:-1], count + 1)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":31370,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:58:13","func_code":"def maximum(l, max_n=None):\n if not len(l):\n return max_n\n if not max_n or l[0] > max_n:\n return maximum(l[1:], l[0])\n return maximum(l[1:], max_n)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":39449,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:58:13","func_code":"def maximum(l, max_n=None):\n if not len(l):\n return max_n\n if not max_n or l[0] > max_n:\n return maximum(l[1:], l[0])\n return maximum(l[1:], max_n)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":831,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:02:24","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fib(n - 1) + fib(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":28915,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:02:43","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":21262,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:03:24","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":41662,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:03:24","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":25258,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:07:56","func_code":"def maximum(list):\n if len(list) == 1:\n return list[0]\n else:\n m = maximum(list[1:])\n return m if m > list[0] else list[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":3669,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:07:56","func_code":"def maximum(list):\n if len(list) == 1:\n return list[0]\n else:\n m = maximum(list[1:])\n return m if m > list[0] else list[0]","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":23197,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:09:48","func_code":"def minimum(list):\n if len(list) == 1:\n return list[0]\n else:\n return min(list[0], minimum(list[1:]))","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":36972,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:09:48","func_code":"def minimum(list):\n if len(list) == 1:\n return list[0]\n else:\n return min(list[0], minimum(list[1:]))","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":27272,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:11:02","func_code":"def count_letters(str):\n return len(str)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":33787,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:11:02","func_code":"def count_letters(str):\n return len(str)","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":20952,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:12:42","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":13023,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:12:42","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":34269,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:14:46","func_code":"def quicksort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":23222,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:14:46","func_code":"def quicksort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":false} -{"submission_id":21055,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:16:44","func_code":"def selectionsort(alist):\n for fillslot in range(len(alist) - 1, 0, -1):\n positionOfMax = 0\n for location in range(1, fillslot + 1):\n if alist[location] > alist[positionOfMax]:\n positionOfMax = location\n temp = alist[fillslot]\n alist[fillslot] = alist[positionOfMax]\n alist[positionOfMax] = temp","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":27174,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:16:44","func_code":"def selectionsort(alist):\n for fillslot in range(len(alist) - 1, 0, -1):\n positionOfMax = 0\n for location in range(1, fillslot + 1):\n if alist[location] > alist[positionOfMax]:\n positionOfMax = location\n temp = alist[fillslot]\n alist[fillslot] = alist[positionOfMax]\n alist[positionOfMax] = temp","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":18489,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:16:44","func_code":"def selectionsort(alist):\n for fillslot in range(len(alist) - 1, 0, -1):\n positionOfMax = 0\n for location in range(1, fillslot + 1):\n if alist[location] > alist[positionOfMax]:\n positionOfMax = location\n temp = alist[fillslot]\n alist[fillslot] = alist[positionOfMax]\n alist[positionOfMax] = temp","func_name":"selectionsort","assignment_id":"selectionsort_102.py_ca117_selectionsort","academic_year":2016,"module":"ca117","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":3290,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 23:45:57","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":16401,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 23:45:57","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":27865,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 23:45:57","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":26945,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 23:52:06","func_code":"def minimum(lst):\n if len(lst) == 1:\n return lst[-1]\n elif lst[0] < lst[-1]:\n return minimum(lst[:-1])\n elif lst[0] > lst[-1]:\n return minimum(lst[1:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":31233,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 23:52:06","func_code":"def minimum(lst):\n if len(lst) == 1:\n return lst[-1]\n elif lst[0] < lst[-1]:\n return minimum(lst[:-1])\n elif lst[0] > lst[-1]:\n return minimum(lst[1:])","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":31023,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 23:53:17","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":18910,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 23:53:17","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":33921,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-28 23:58:10","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":40715,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-28 23:58:10","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":3935,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-28 23:58:10","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":35689,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:44:22","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n print(a)\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":14498,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:44:22","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":18006,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:44:22","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":37314,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:50:50","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":17934,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:50:50","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n print(a)\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":36231,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:50:50","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":28681,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:56:43","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":20934,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:56:43","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":33599,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:56:43","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n print(a)\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":13466,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:58:58","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":14231,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:58:58","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n print(a)\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":29693,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:58:58","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":14282,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":11202,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":20691,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n fib = a + b\n a = b\n b = fib\n i += 1\n return fib","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":3560,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":16838,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":27169,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n fib = a + b\n a = b\n b = fib\n i += 1\n return fib","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":2436,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"iterative08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":23670,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"iterative08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0')==-1 and index('0','0')==0 and index('9dK=1%s)a>PI5FmV\/dq,-=]N2MmOkB .hRL_P2','=')==3","description":"Returns the position of letter in str, -1 if it is not there.","correct":false} -{"submission_id":4846,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n fib = a + b\n a = b\n b = fib\n i += 1\n return fib","func_name":"fibonacci","assignment_id":"iterative08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":false} -{"submission_id":3251,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:43:35","func_code":"def reverse(a):\n a = a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":15604,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:47:16","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":22358,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:51:28","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":33938,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:51:49","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":35622,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:54:13","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n return swap(a)","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":6309,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:54:50","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":28398,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:58:04","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":4032,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:58:04","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":36946,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 20:09:46","func_code":"def selection_sort(a):\n for i in a:\n j = 0\n while j < len(a):\n if i < a[j]:\n a[j] = i\n j += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":14105,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 20:13:17","func_code":"def selection_sort(a):\n for i in range(len(a)):\n j = 1\n if a[j] > a[i]:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n j += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":34509,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 20:14:29","func_code":"def selection_sort(a):\n for i in range(len(a)):\n j = 1\n if a[j] > a[i]:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n j += 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27498,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 20:15:24","func_code":"def selection_sort(a):\n return sorted(a)","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28262,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 20:15:24","func_code":"def selection_sort(a):\n return sorted(a)","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":27876,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 20:15:24","func_code":"def selection_sort(a):\n return sorted(a)","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":9423,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-05-09 11:17:23","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":31615,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-05-09 11:17:23","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":11138,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":3060,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":20189,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":38367,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":17804,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"recursive08.py_ca278_fibonacci","academic_year":2016,"module":"ca278","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":10717,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":19714,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":2296,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"recursive08.py_ca278_index","academic_year":2016,"module":"ca278","test":"assert index('','0',0)==-1 and index('dc8','s',0)==-1","description":"Return the position of letter in str, -1 if it is not there.","correct":true} -{"submission_id":18157,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"recursive08.py_ca278_search","academic_year":2016,"module":"ca278","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","description":"Return whether a letter is part of a string","correct":true} -{"submission_id":2158,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-05-12 23:14:14","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":13308,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-05-12 23:14:14","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":38126,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-05-12 23:14:14","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort_102.py_ca117_quicksort","academic_year":2016,"module":"ca117","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","description":"Recursively partition list until sorted.","correct":true} -{"submission_id":40272,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 00:56:39","func_code":"def minimum(list):\n if len(list) == 1:\n return list[0]\n else:\n if list[-1] < list[0]:\n list.remove[-1]\n else:\n list.remove[0]\n return minmum(list)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":false} -{"submission_id":20295,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 00:59:20","func_code":"def minimum(list):\n if len(list) == 1:\n return list[0]\n else:\n if list[-1] < list[0]:\n list.pop(0)\n else:\n list.pop(-1)\n return minimum(list)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":10326,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 00:59:20","func_code":"def minimum(list):\n if len(list) == 1:\n return list[0]\n else:\n if list[-1] < list[0]:\n list.pop(0)\n else:\n list.pop(-1)\n return minimum(list)","func_name":"minimum","assignment_id":"minimum_102.py_ca117_minimum","academic_year":2016,"module":"ca117","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","description":"Return the minimum element in a list of numbers.","correct":true} -{"submission_id":18982,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 01:02:13","func_code":"def maximum(list):\n if len(list) == 1:\n return list[0]\n else:\n if list[-1] < list[0]:\n list.pop(-1)\n else:\n list.pop(0)\n return maximum(list)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":11025,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 01:02:13","func_code":"def maximum(list):\n if len(list) == 1:\n return list[0]\n else:\n if list[-1] < list[0]:\n list.pop(-1)\n else:\n list.pop(0)\n return maximum(list)","func_name":"maximum","assignment_id":"maximum_102.py_ca117_maximum","academic_year":2016,"module":"ca117","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","description":"Return the maximum element in a list of numbers.","correct":true} -{"submission_id":899,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 01:32:31","func_code":"def count_letters(string):\n if not string:\n return 0\n else:\n return 1 + count_letters(string.replace(string[0], ''))","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":5658,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 01:53:00","func_code":"def count_letters(string):\n if not string:\n return 0\n else:\n return 1 + count(string.replace(string[0], ''))","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":11941,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 01:53:19","func_code":"def count_letters(string):\n if not string:\n return 0\n else:\n return 1 + count_letters(string.replace(string[0], ''))","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":false} -{"submission_id":17297,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:24:21","func_code":"def count_letters(string):\n if not string:\n return 0\n else:\n return 1 + count_letters(string.replace(string[0], '', 1))","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":10149,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:24:21","func_code":"def count_letters(string):\n if not string:\n return 0\n else:\n return 1 + count_letters(string.replace(string[0], '', 1))","func_name":"count_letters","assignment_id":"count_102.py_ca117_count_letters","academic_year":2016,"module":"ca117","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","description":"Return the number of lettres in a string.","correct":true} -{"submission_id":877,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:32:55","func_code":"def reverse_list(list):\n if not list:\n return list\n else:\n return list[-1] + reverse_list(list)","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":26877,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:56:17","func_code":"def reverse_list(listt):\n if not listt:\n return listt\n else:\n return list(listt[-1]) + reverse_list(listt[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":false} -{"submission_id":36753,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:59:45","func_code":"def reverse_list(listt):\n if not listt:\n return listt\n else:\n return [listt[-1]] + reverse_list(listt[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":4690,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:59:45","func_code":"def reverse_list(listt):\n if not listt:\n return listt\n else:\n return [listt[-1]] + reverse_list(listt[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":17328,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:59:45","func_code":"def reverse_list(listt):\n if not listt:\n return listt\n else:\n return [listt[-1]] + reverse_list(listt[:-1])","func_name":"reverse_list","assignment_id":"reverse_102.py_ca117_reverse_list","academic_year":2016,"module":"ca117","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","description":"Reverse a list of elements.","correct":true} -{"submission_id":17465,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-05-26 12:00:55","func_code":"def selection_sort(a):\n for i in range(len(a)):\n least = i\n for k in range(i + 1, len(a)):\n if a[k] < a[least]:\n least = k\n tmp = a[i]\n a[i] = a[k]\n a[k] = tmp","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":11029,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-05-26 12:06:54","func_code":"def selection_sort(a):\n for i in range(len(a)):\n mini = min(a[i:])\n min_index = a[i:].index(mini)\n a[i + min_index] = a[i]\n a[i] = mini\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":30961,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-05-26 12:07:52","func_code":"def selection_sort(a):\n for i in range(len(a)):\n mini = min(a[i:])\n min_index = a[i:].index(mini)\n a[i + min_index] = a[i]\n a[i] = mini\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":12824,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-05-26 12:07:52","func_code":"def selection_sort(a):\n for i in range(len(a)):\n mini = min(a[i:])\n min_index = a[i:].index(mini)\n a[i + min_index] = a[i]\n a[i] = mini\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23102,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-28 01:26:33","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":21899,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-28 01:26:33","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_102.py_ca117_fibonacci","academic_year":2016,"module":"ca117","test":"assert fibonacci(0)==1 and fibonacci(1)==1 and fibonacci(2)==2 and fibonacci(10)==89 and fibonacci(23)==46368","description":"Return the value of the fibonacci series at position n.","correct":true} -{"submission_id":2336,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-13 14:17:19","func_code":"def reverse(a):\n print(a[::-1])","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":16,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-13 14:19:22","func_code":"def reverse(a):\n print(a.reverse())","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":29153,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-13 14:19:39","func_code":"def reverse(a):\n return a.reverse()","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":3867,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-13 14:20:01","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":36462,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-13 14:20:01","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":5911,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 13:13:21","func_code":"def swap(a, i, j):\n y = a[j]\n a[j] = a[i]\n a[i] = y\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":29533,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 13:13:21","func_code":"def swap(a, i, j):\n y = a[j]\n a[j] = a[i]\n a[i] = y\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":15931,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 13:13:21","func_code":"def swap(a, i, j):\n y = a[j]\n a[j] = a[i]\n a[i] = y\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":10186,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:34:55","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":12529,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:35:41","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":36067,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:36:26","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":28590,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:36:50","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":3697,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:37:33","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":13169,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:38:21","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":8705,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:41:25","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":30215,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:41:53","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":31883,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:43:17","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":4919,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:44:23","func_code":"def append2list(l1, l2=[]):\n l2 = l1\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":19827,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:46:03","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n if len(l2) <= 2:\n l2.append(i)\n else:\n l2 = l1\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":8034,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:58:51","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n if len(l2) <= 2:\n l2.append(i)\n else:\n l2 = l1\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":21865,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:01:00","func_code":"def append2list(l1, l2=None):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":32284,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:02:19","func_code":"def append2list(l1, l2=None):\n for i in l1:\n try:\n l2.append(i)\n except AttributeError:\n continue\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":12083,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:02:41","func_code":"def append2list(l1, l2):\n for i in l1:\n try:\n l2.append(i)\n except AttributeError:\n continue\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":24381,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:02:53","func_code":"def append2list(l1, l2=''):\n for i in l1:\n try:\n l2.append(i)\n except AttributeError:\n continue\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":12268,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:03:16","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n try:\n l2.append(i)\n except AttributeError:\n continue\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":20115,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:03:48","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n try:\n l1 = []\n l2.append(i)\n except AttributeError:\n continue\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":6012,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:04:11","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n try:\n l1 = []\n l2 = []\n l2.append(i)\n except AttributeError:\n continue\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":false} -{"submission_id":20205,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:28:12","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":11443,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:28:12","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":25337,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:28:12","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"mutable_62.py_ca117_append2list","academic_year":2016,"module":"ca117","test":"assert append2list([0, 0],[0])==[0, 0, 0] and append2list([0, 0, 0, 0, 0],[0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0] and append2list([0, 0],[0, 0, 0])==[0, 0, 0, 0, 0] and append2list([],[])==[] and append2list([0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0])==[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","description":"Append l1 to l2. If l2 not supplied default to empty list.","correct":true} -{"submission_id":34174,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 20:22:45","func_code":"def swap_keys_values(d):\n dictionary = {}\n for k, v in list(d.items()):\n dictionary[v] = k\n return dictionary","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":14888,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 20:22:45","func_code":"def swap_keys_values(d):\n dictionary = {}\n for k, v in list(d.items()):\n dictionary[v] = k\n return dictionary","func_name":"swap_keys_values","assignment_id":"swap_42.py_ca117_swap_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","description":"Swap keys with values.","correct":true} -{"submission_id":18926,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 21:37:17","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = set(d.values())\n for k, v in list(d.items()):\n if v in unique:\n dictionary[v] = k\n return dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":15951,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 21:42:02","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n print(unique)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":41353,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 22:38:03","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n for k, v in unique:\n if unique.count(v) > 1:\n del unique[k, v]\n print(unique)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":36838,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 22:39:36","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n for k, v in unique:\n print(v)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":37746,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 22:40:17","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n for k, v in unique:\n if unique.count(v) > 1:\n print(v)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":22039,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 22:44:10","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n for k, v in unique:\n if unique.count(v) > 1:\n print(v)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":21251,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 22:44:10","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n for k, v in unique:\n if unique.count(v) > 1:\n print(v)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":2566,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 22:44:10","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n for k, v in unique:\n if unique.count(v) > 1:\n print(v)","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":27923,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-30 00:07:49","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n deli = []\n for k, v in list(d.items()):\n unique.append(v)\n for v in unique:\n if unique.count(v) > 1:\n deli.append(v)\n for v in unique:\n if v in deli:\n del unique[v]\n for k, v in list(d.items()):\n if v in unique:\n dictionary[v] = k\n return dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":27040,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-30 00:09:23","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n deli = []\n for k, v in list(d.items()):\n unique.append(v)\n for v in unique:\n if unique.count(v) > 1:\n deli.append(v)\n for v in unique:\n try:\n if v in deli:\n del unique[v]\n except:\n continue\n for k, v in list(d.items()):\n if v in unique:\n dictionary[v] = k\n return dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":false} -{"submission_id":29070,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-30 01:10:18","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n counter = []\n new = []\n for k, v in list(d.items()):\n counter.append(v)\n for c in counter:\n if counter.count(c) == 1:\n new.append(c)\n for k, v in list(d.items()):\n if v in new:\n dictionary[v] = k\n return dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":30599,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-30 01:10:18","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n counter = []\n new = []\n for k, v in list(d.items()):\n counter.append(v)\n for c in counter:\n if counter.count(c) == 1:\n new.append(c)\n for k, v in list(d.items()):\n if v in new:\n dictionary[v] = k\n return dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_more_42.py_ca117_swap_unique_keys_values","academic_year":2016,"module":"ca117","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","description":"Swap keys with unique values.","correct":true} -{"submission_id":15821,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-18 15:17:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40507,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-18 15:17:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":25705,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-18 15:19:28","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21731,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-18 15:19:28","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17839,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 21:59:14","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":23230,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 22:01:27","func_code":"def swap(a, i, j):\n for k in a:\n a[i], a[j] = a[j], a[i]\n return a\n\n\ndef reverse(a):\n return swap(a)","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":14842,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 22:12:11","func_code":"def reverse(a):\n return [i for i in range(len(a), 0, -1)]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":33187,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 22:18:19","func_code":"def reverse(a):\n new = []\n for i in a.__reversed__():\n new.append(i)\n return new","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":13173,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 22:31:23","func_code":"def swap(a, i='', j=''):\n if i == '' and j == '':\n i = 0\n j = len(a) - 1\n k = 0\n while k < len(a) \/ 2:\n a[i], a[j] = a[j], a[i]\n i += 1\n j -= 1\n k += 1\n else:\n a[i], a[j] = a[j], a[i]\n return a\n\n\ndef reverse(a):\n return swap(a)","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":16424,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 22:31:23","func_code":"def swap(a, i='', j=''):\n if i == '' and j == '':\n i = 0\n j = len(a) - 1\n k = 0\n while k < len(a) \/ 2:\n a[i], a[j] = a[j], a[i]\n i += 1\n j -= 1\n k += 1\n else:\n a[i], a[j] = a[j], a[i]\n return a\n\n\ndef reverse(a):\n return swap(a)","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":36000,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 22:31:23","func_code":"def swap(a, i='', j=''):\n if i == '' and j == '':\n i = 0\n j = len(a) - 1\n k = 0\n while k < len(a) \/ 2:\n a[i], a[j] = a[j], a[i]\n i += 1\n j -= 1\n k += 1\n else:\n a[i], a[j] = a[j], a[i]\n return a\n\n\ndef reverse(a):\n return swap(a)","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":5647,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:09:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":22005,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:09:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":10359,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:14:32","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = j + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8227,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:37:26","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":27779,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:37:26","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":37769,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:33:25","func_code":"def reverse():\n a = a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":6530,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:33:45","func_code":"def reverse(a):\n a = a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":34372,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:35:15","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":8239,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:36:03","func_code":"def reverse(b):\n a = b[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":2798,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:36:52","func_code":"def reverse(b):\n print(a[::-1])","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":19087,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:38:49","func_code":"def reverse(a):\n a = a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":11017,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:41:32","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":27245,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:42:38","func_code":"def reverse(a):\n print(a[::-1])","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":3661,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:44:14","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":3446,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:44:14","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":2858,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-10-02 10:34:10","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20395,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-10-02 10:34:10","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":4943,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:30:16","func_code":"def sort(a):\n i = 0","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20535,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:36:34","func_code":"def sort(a):\n i = 0\n p = 0\n while i < len(a):\n if a[i] < a[p]:\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33789,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:37:36","func_code":"def sort(a):\n i = 0\n p = 0\n while i < len(a):\n if a[i] > a[p]:\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":18182,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:38:09","func_code":"def sort(a):\n i = 0\n p = 0\n while i < len(a):\n if a[i] < a[p]:\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33466,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 14:39:45","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":40250,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 14:41:04","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":12736,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 14:43:03","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":12556,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 14:43:39","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20357,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 14:45:37","func_code":"def find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n find_position_of_smallest(a, i)\n a[0] = tmp","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10558,"user":"3bb099c4-4248-4efd-bfe2-3c423b916ce0","date":"2017-10-02 14:46:00","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":8441,"user":"d2330156-60dd-4aca-a925-9aa27e3edb48","date":"2017-10-02 14:46:05","func_code":"def sort(a):\n i = 0","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25547,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 14:46:06","func_code":"def find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n find_position_of_smallest(a, i)\n tmp = i\n a[0] = tmp","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":29197,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 14:46:21","func_code":"def find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n find_position_of_smallest(a, i)\n i = tmp\n a[0] = tmp","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":4899,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:47:56","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":11719,"user":"d31360b5-795b-45df-bd6f-a99df2683eae","date":"2017-10-02 14:48:07","func_code":"def sort(a):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":41457,"user":"d2330156-60dd-4aca-a925-9aa27e3edb48","date":"2017-10-02 14:48:35","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":40405,"user":"d2330156-60dd-4aca-a925-9aa27e3edb48","date":"2017-10-02 14:48:35","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23408,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:48:51","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":20240,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:49:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, tmp)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":5181,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:49:50","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":28457,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:50:07","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n j = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":4158,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:51:20","func_code":"def sort(a):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":28796,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-10-02 14:51:30","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n track = 0\n tempnum = a[i + track]\n while track != len(a) - i:\n if a[i + track] == tempnum:\n tempnum = a[i + track]\n track = track + 1\n return tempnum\n\n\ndef sort(a):\n i = 0\n j = 0\n while i != len(a):\n j = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":30717,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:52:03","func_code":"def sort(a):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":19786,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 14:52:18","func_code":"def find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n find_position_of_smallest(a, i)\n i = tmp\n a[0] = tmp","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39836,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:52:28","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n if a[i] < a[p]:\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":3336,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-10-02 14:53:28","func_code":"def sort(a):\n i = 0\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":41274,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:53:37","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n if a[i] < a[p]:\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":18833,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-10-02 14:53:41","func_code":"def sort(a):\n i = 0\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":22434,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:54:08","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n if a[i] < a[p]:\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":36815,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-02 14:54:30","func_code":"def sort(a):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":3318,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:56:33","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10324,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:56:52","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n j = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27012,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 14:58:16","func_code":"def sort(a):\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10556,"user":"4490d043-a9e0-48aa-a62c-ddcc67ed7fba","date":"2017-10-02 14:58:24","func_code":"def sort(a):\n i = 0","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":24101,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:58:44","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n j = 0\n while j < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n find_position_of_smallest","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":29545,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-02 14:58:45","func_code":"def sort(a):\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":2655,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:58:53","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n j = 0\n while j < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39750,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 14:59:04","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":35512,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-02 14:59:15","func_code":"def sort(a):\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":18492,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 14:59:35","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n swap(a, i, j)\n j = j + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":36293,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-02 14:59:51","func_code":"def sort(a):\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":18868,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-10-02 15:00:26","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":31029,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 15:00:31","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, j)\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":42403,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:00:55","func_code":"def sort(a):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":13505,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-02 15:01:06","func_code":"def sort(a):\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":20574,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-10-02 15:01:35","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n track = 0\n tempnum = a[i + track]\n while track != len(a) - i:\n if a[i + track] < tempnum:\n tempnum = a[i + track]\n track = track + 1\n return track + i - 1\n\n\ndef sort(a):\n i = 0\n j = 0\n while i != len(a):\n j = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":3199,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 15:01:37","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":32981,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 15:01:51","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":22944,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 15:01:51","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38420,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 15:02:00","func_code":"def sort(a):\n p = i\n j = i + 1\n i = 0\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":26098,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 15:02:25","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n swap(a, i, j)\n j = j + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":30167,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:02:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n j = 0\n while j < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27658,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:02:52","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return k","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":1739,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-02 15:03:13","func_code":"def sort(a):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":15429,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:03:13","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return k","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":20897,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:03:15","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n j = 0\n while j < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17136,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:03:28","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return k","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":15207,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:04:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17349,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:04:50","func_code":"def sort(a):\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":30984,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:05:11","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":4265,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:05:20","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":6782,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:05:33","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":36004,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:05:33","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":9719,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-02 15:06:23","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5460,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-02 15:06:23","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38159,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:06:30","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":30872,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:06:45","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":24975,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:07:24","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[k]\n a[k] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":370,"user":"d31360b5-795b-45df-bd6f-a99df2683eae","date":"2017-10-02 15:07:35","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8690,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:07:40","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10393,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-02 15:08:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":9273,"user":"6aa0e790-273f-4239-98eb-0b504997b70b","date":"2017-10-02 15:08:04","func_code":"def sort(a):\n i = 0","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":22725,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 15:08:12","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":6402,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 15:08:12","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33689,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 15:08:24","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":3593,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 15:08:25","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":6465,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 15:08:38","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":15922,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 15:08:38","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":7290,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:08:59","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":32747,"user":"d31360b5-795b-45df-bd6f-a99df2683eae","date":"2017-10-02 15:09:07","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23568,"user":"d31360b5-795b-45df-bd6f-a99df2683eae","date":"2017-10-02 15:09:07","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33575,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:09:09","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":13866,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 15:09:18","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":14825,"user":"4490d043-a9e0-48aa-a62c-ddcc67ed7fba","date":"2017-10-02 15:09:49","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21672,"user":"4490d043-a9e0-48aa-a62c-ddcc67ed7fba","date":"2017-10-02 15:09:49","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":40576,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 15:10:38","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":24100,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 15:11:12","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":755,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 15:11:12","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":348,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:12:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":14614,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:12:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39204,"user":"5ba5010e-c0ac-4560-9fa6-aadbc278c3f8","date":"2017-10-02 15:14:13","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5012,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:14:37","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":2708,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-02 15:14:48","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20670,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-02 15:14:48","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21833,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-02 15:14:48","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33500,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-10-02 15:16:11","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n tempnum = i\n while i + 1 != len(a):\n if a[i] < a[tempnum]:\n tempnum = i\n i = i + 1\n return tempnum\n\n\ndef sort(a):\n i = 0\n j = 0\n while i != len(a):\n j = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38753,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:16:36","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38265,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:16:36","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41437,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-10-02 15:17:46","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n tempnum = i\n while i != len(a):\n if a[i] < a[tempnum]:\n tempnum = i\n i = i + 1\n return tempnum\n\n\ndef sort(a):\n i = 0\n j = 0\n while i != len(a):\n j = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":255,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-02 15:17:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":15737,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-02 15:17:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17526,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-02 15:17:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":32611,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:17:48","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":18901,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-10-02 15:18:04","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n tempnum = i\n while i != len(a):\n if a[i] < a[tempnum]:\n tempnum = i\n i = i + 1\n return tempnum\n\n\ndef sort(a):\n i = 0\n j = 0\n while i != len(a):\n j = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":11078,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-10-02 15:18:04","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n tempnum = i\n while i != len(a):\n if a[i] < a[tempnum]:\n tempnum = i\n i = i + 1\n return tempnum\n\n\ndef sort(a):\n i = 0\n j = 0\n while i != len(a):\n j = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":19624,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:18:18","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n swap\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":14646,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:18:37","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":37818,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:20:23","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":31425,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:20:49","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":37353,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-02 15:21:05","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n temp = a[p]\n a[p] = a[i]\n a[i] = temp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":40442,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:21:14","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":18090,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:21:42","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":32573,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-02 15:22:11","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35980,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-02 15:22:11","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":18554,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-02 15:22:11","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":24013,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:22:17","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = 0\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":1226,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-02 15:22:39","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21950,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-02 15:22:39","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25733,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:22:40","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":19319,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-02 15:23:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, j, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":1808,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:23:09","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17087,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-02 15:23:52","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":18100,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-02 15:23:52","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":30616,"user":"5bdd4d7a-504a-4b32-ac06-c9d0e6adb55a","date":"2017-10-02 15:24:04","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":36172,"user":"5bdd4d7a-504a-4b32-ac06-c9d0e6adb55a","date":"2017-10-02 15:24:04","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38298,"user":"5bdd4d7a-504a-4b32-ac06-c9d0e6adb55a","date":"2017-10-02 15:24:04","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":11827,"user":"7d0d82bd-2bdb-48da-a37f-ffa6ee59d960","date":"2017-10-02 15:24:13","func_code":"def find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":3774,"user":"7d0d82bd-2bdb-48da-a37f-ffa6ee59d960","date":"2017-10-02 15:24:13","func_code":"def find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17059,"user":"7d0d82bd-2bdb-48da-a37f-ffa6ee59d960","date":"2017-10-02 15:24:13","func_code":"def find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":11264,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 15:24:36","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27915,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:24:41","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n find_position - of - smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8146,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 15:24:54","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":34828,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:24:56","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":1154,"user":"e5dedf13-336d-484f-81bc-d7898f0f002e","date":"2017-10-02 15:24:59","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n while i < len(a):\n p = find_first_position_of_smallest(a, i)\n swap(a, j, i)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":29688,"user":"3aed57e0-c2a2-49b2-afaf-23d3d77478fb","date":"2017-10-02 15:25:04","func_code":"def find_position_of_smallest(a, i):\n x = i\n while i < len(a):\n if a[i] < a[x]:\n x = i\n i = i + 1\n return x\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":35235,"user":"3aed57e0-c2a2-49b2-afaf-23d3d77478fb","date":"2017-10-02 15:25:04","func_code":"def find_position_of_smallest(a, i):\n x = i\n while i < len(a):\n if a[i] < a[x]:\n x = i\n i = i + 1\n return x\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27109,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 15:25:13","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n p = i\n find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":31507,"user":"6aa0e790-273f-4239-98eb-0b504997b70b","date":"2017-10-02 15:25:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21806,"user":"edfafe89-fb39-4804-a616-a60af6a9fb7e","date":"2017-10-02 15:25:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":26343,"user":"edfafe89-fb39-4804-a616-a60af6a9fb7e","date":"2017-10-02 15:25:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17273,"user":"edfafe89-fb39-4804-a616-a60af6a9fb7e","date":"2017-10-02 15:25:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":9848,"user":"6aa0e790-273f-4239-98eb-0b504997b70b","date":"2017-10-02 15:25:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":22429,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:25:47","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":24153,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-02 15:26:39","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":30913,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-02 15:26:39","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":37373,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-02 15:26:39","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33559,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 15:26:47","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n p = i\n find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":26033,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:26:56","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":13999,"user":"bdc790c5-9f6f-4907-83fb-bb9c00cbd2d1","date":"2017-10-02 15:27:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38452,"user":"bdc790c5-9f6f-4907-83fb-bb9c00cbd2d1","date":"2017-10-02 15:27:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41464,"user":"bdc790c5-9f6f-4907-83fb-bb9c00cbd2d1","date":"2017-10-02 15:27:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5160,"user":"169d7a9e-d0dd-4e8b-937d-fcd76c099acc","date":"2017-10-02 15:27:05","func_code":"def sort(a):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":42114,"user":"b9519383-96f3-4fcc-b33f-df67f186ba78","date":"2017-10-02 15:27:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n smallest = i\n while i < len(a):\n if a[i] < a[smallest]:\n smallest = i\n i = i + 1\n return smallest\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28393,"user":"b9519383-96f3-4fcc-b33f-df67f186ba78","date":"2017-10-02 15:27:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n smallest = i\n while i < len(a):\n if a[i] < a[smallest]:\n smallest = i\n i = i + 1\n return smallest\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":3191,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:27:51","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":32368,"user":"e5dedf13-336d-484f-81bc-d7898f0f002e","date":"2017-10-02 15:27:58","func_code":"def sort(a):\n i = 0","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38847,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:28:17","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":30698,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:28:17","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28468,"user":"0f1cbd69-016d-4739-b232-fed37e5676ad","date":"2017-10-02 15:28:27","func_code":"def sort(a):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":40305,"user":"0f1cbd69-016d-4739-b232-fed37e5676ad","date":"2017-10-02 15:28:53","func_code":"def sort(p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":16076,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:29:21","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":8110,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:29:21","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":16502,"user":"5ba5010e-c0ac-4560-9fa6-aadbc278c3f8","date":"2017-10-02 15:29:30","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":8168,"user":"0f1cbd69-016d-4739-b232-fed37e5676ad","date":"2017-10-02 15:29:42","func_code":"def sort(p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":37332,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-10-02 15:29:57","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35555,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-10-02 15:29:57","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17619,"user":"5ba5010e-c0ac-4560-9fa6-aadbc278c3f8","date":"2017-10-02 15:30:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":42199,"user":"5ba5010e-c0ac-4560-9fa6-aadbc278c3f8","date":"2017-10-02 15:30:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38999,"user":"3bb099c4-4248-4efd-bfe2-3c423b916ce0","date":"2017-10-02 15:30:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23723,"user":"3bb099c4-4248-4efd-bfe2-3c423b916ce0","date":"2017-10-02 15:30:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":27744,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 15:30:34","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":8177,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 15:30:34","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":2353,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:31:46","func_code":"def find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":32017,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-02 15:32:08","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":32309,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-02 15:32:08","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14763,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-02 15:32:08","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":18276,"user":"e5dedf13-336d-484f-81bc-d7898f0f002e","date":"2017-10-02 15:32:13","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33185,"user":"e5dedf13-336d-484f-81bc-d7898f0f002e","date":"2017-10-02 15:32:13","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":31391,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:32:49","func_code":"def find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":24965,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:32:49","func_code":"def find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":7826,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:32:49","func_code":"def find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":29660,"user":"161bb8fd-c916-4d4e-a439-1dce6fc8f542","date":"2017-10-02 15:35:13","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23734,"user":"161bb8fd-c916-4d4e-a439-1dce6fc8f542","date":"2017-10-02 15:35:13","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":6337,"user":"161bb8fd-c916-4d4e-a439-1dce6fc8f542","date":"2017-10-02 15:35:13","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41623,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-10-02 15:42:41","func_code":"def swap(a, i, j):\n a[i], a[j] = a[j], a[i]\n\n\ndef find_position_of_smallest(a, i):\n l = a[i:]\n s = 0\n j = 0\n while j < len(l):\n if l[j] < l[s]:\n s = j\n j += 1\n return s + len(a) - len(l)\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n smallest = find_position_of_smallest(a, i)\n swap(a, i, smallest)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":8953,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-10-02 15:42:41","func_code":"def swap(a, i, j):\n a[i], a[j] = a[j], a[i]\n\n\ndef find_position_of_smallest(a, i):\n l = a[i:]\n s = 0\n j = 0\n while j < len(l):\n if l[j] < l[s]:\n s = j\n j += 1\n return s + len(a) - len(l)\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n smallest = find_position_of_smallest(a, i)\n swap(a, i, smallest)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":4622,"user":"ac8b6b8f-d93c-46e5-8736-44e36e620908","date":"2017-10-02 15:51:28","func_code":"def sort(a):\n x = int(a[0])\n i = 0\n while i < len(a) - 1:\n if int(a[i]) > int(a[i + 1]):\n x = a[i]\n a[i] = a[i + 1]\n a[i + 1] = x\n i = i + 1\n i = 0\n while i < len(a):\n print(a[i])\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":19674,"user":"ac8b6b8f-d93c-46e5-8736-44e36e620908","date":"2017-10-02 15:52:42","func_code":"def sort(a):\n x = int(a[0])\n i = 0\n while i < len(a) - 1:\n if int(a[i]) > int(a[i + 1]):\n x = a[i]\n a[i] = a[i + 1]\n a[i + 1] = x\n i = i + 1\n i = 0\n while i < len(a):\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":23903,"user":"ac8b6b8f-d93c-46e5-8736-44e36e620908","date":"2017-10-02 15:52:42","func_code":"def sort(a):\n x = int(a[0])\n i = 0\n while i < len(a) - 1:\n if int(a[i]) > int(a[i + 1]):\n x = a[i]\n a[i] = a[i + 1]\n a[i + 1] = x\n i = i + 1\n i = 0\n while i < len(a):\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17424,"user":"ac8b6b8f-d93c-46e5-8736-44e36e620908","date":"2017-10-02 15:52:42","func_code":"def sort(a):\n x = int(a[0])\n i = 0\n while i < len(a) - 1:\n if int(a[i]) > int(a[i + 1]):\n x = a[i]\n a[i] = a[i + 1]\n a[i + 1] = x\n i = i + 1\n i = 0\n while i < len(a):\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":16379,"user":"4205f21d-1c6e-499a-a25c-83a2d9d5ad93","date":"2017-10-02 20:18:37","func_code":"def sort(a):\n p = 0\n j = 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":36674,"user":"4205f21d-1c6e-499a-a25c-83a2d9d5ad93","date":"2017-10-02 20:21:05","func_code":"def sort(a):\n i = 0","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38523,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-03 15:41:52","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23754,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-03 15:42:12","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41574,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-03 15:42:46","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":9738,"user":"161bb8fd-c916-4d4e-a439-1dce6fc8f542","date":"2017-10-03 15:43:33","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":1125,"user":"161bb8fd-c916-4d4e-a439-1dce6fc8f542","date":"2017-10-03 15:43:33","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":12158,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-03 15:43:55","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":9050,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-03 15:43:55","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28444,"user":"f40d6a8a-0620-4bda-8c98-4c952edace05","date":"2017-10-04 11:14:35","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":6574,"user":"f40d6a8a-0620-4bda-8c98-4c952edace05","date":"2017-10-04 11:14:35","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":19552,"user":"415d4431-1b98-4241-a978-02dc16bf556e","date":"2017-10-04 11:17:40","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":19152,"user":"415d4431-1b98-4241-a978-02dc16bf556e","date":"2017-10-04 11:18:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":26081,"user":"415d4431-1b98-4241-a978-02dc16bf556e","date":"2017-10-04 11:18:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":37141,"user":"169d7a9e-d0dd-4e8b-937d-fcd76c099acc","date":"2017-10-04 11:20:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23409,"user":"169d7a9e-d0dd-4e8b-937d-fcd76c099acc","date":"2017-10-04 11:20:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":37343,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:24:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":30918,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 11:25:42","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":2083,"user":"2a1a0a7b-975b-4463-96bb-4f52900ce463","date":"2017-10-04 11:25:52","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n while i < len(a):\n p = find_position_of_smallest\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":25855,"user":"9413c2ae-94cc-4b45-8180-0919de97fe15","date":"2017-10-04 11:27:42","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n i = 0\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38967,"user":"2a1a0a7b-975b-4463-96bb-4f52900ce463","date":"2017-10-04 11:27:45","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n while i < len(a):\n p = find_position_of_smallest\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":28208,"user":"2a1a0a7b-975b-4463-96bb-4f52900ce463","date":"2017-10-04 11:27:45","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n while i < len(a):\n p = find_position_of_smallest\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":7957,"user":"2a1a0a7b-975b-4463-96bb-4f52900ce463","date":"2017-10-04 11:27:45","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n while i < len(a):\n p = find_position_of_smallest\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":33546,"user":"9413c2ae-94cc-4b45-8180-0919de97fe15","date":"2017-10-04 11:28:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n i = p\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8141,"user":"0f1cbd69-016d-4739-b232-fed37e5676ad","date":"2017-10-04 11:30:25","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":32655,"user":"0f1cbd69-016d-4739-b232-fed37e5676ad","date":"2017-10-04 11:30:25","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":5873,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 11:34:23","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41055,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:34:50","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20367,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:35:02","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38026,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 11:35:11","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21349,"user":"4490d043-a9e0-48aa-a62c-ddcc67ed7fba","date":"2017-10-04 11:37:03","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25286,"user":"4490d043-a9e0-48aa-a62c-ddcc67ed7fba","date":"2017-10-04 11:37:03","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5167,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-04 11:38:03","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33497,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:40:58","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n i = 0\n while i < len(a):\n if a[i] < a[j]:\n i = i + 1\n return i\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":2564,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:41:31","func_code":"def sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":21944,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-04 11:41:33","func_code":"def sort(a):\n p = i + 1\n i = i + 2\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":12930,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:42:37","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = p + 1\n while i < len(a):\n if a[j] < a[p]:\n p = j\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":28544,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:43:04","func_code":"def sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27532,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:43:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14963,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:43:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14321,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-04 11:43:35","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":7591,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:43:38","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = p + 1\n while i < len(a):\n if a[p] < a[j]:\n j = p\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39007,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:43:58","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = p + 1\n while i < len(a):\n if a[p] < a[j]:\n j = p\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39912,"user":"06043f63-bd06-4b6c-9b40-184b4eca2307","date":"2017-10-04 11:44:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":485,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:45:00","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = p + 1\n while i < len(a):\n if a[j] < a[p]:\n j = p\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":24594,"user":"06043f63-bd06-4b6c-9b40-184b4eca2307","date":"2017-10-04 11:45:04","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21153,"user":"06043f63-bd06-4b6c-9b40-184b4eca2307","date":"2017-10-04 11:45:04","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":10319,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:45:16","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":38522,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:45:37","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n i = i + 1\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39205,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:45:59","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":18448,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-04 11:46:07","func_code":"def sort(a):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":13789,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:46:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = p + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":26129,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:46:55","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10206,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:47:13","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":1682,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:47:53","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":31927,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:47:55","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n i = i + 1\n tmp = a[p]\n a[p] = a[j]\n a[j] = tmp","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":14133,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-04 11:48:02","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":20102,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 11:48:37","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":40707,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:48:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":40694,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:48:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":22776,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-04 11:49:53","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_postion_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":42380,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:50:22","func_code":"def sort(a):\n i = 0\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n i = i + 1\n tmp = a[p]\n a[p] = a[j]\n a[j] = tmp","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":3080,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:50:56","func_code":"def sort(a):\n i = 0\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n i = i + 1\n tmp = a[p]\n a[i] = a[j]\n a[j] = tmp","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":14395,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:51:32","func_code":"def sort(a):\n i = 0\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":5304,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:51:54","func_code":"def sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":40095,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-04 11:52:25","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_postion_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8842,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-04 11:52:25","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_postion_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":34265,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-04 11:52:25","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_postion_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":34794,"user":"a93c9eeb-104a-4436-bd9a-c2e65d311d9e","date":"2017-10-04 11:54:03","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20967,"user":"a93c9eeb-104a-4436-bd9a-c2e65d311d9e","date":"2017-10-04 11:54:03","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":30320,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:54:13","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":25094,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:54:26","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10511,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:56:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":26181,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:56:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":15450,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:56:17","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8732,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:56:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":34973,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:57:10","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":31394,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:57:34","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":37305,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-10-04 11:58:28","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort():\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":14153,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-04 11:58:42","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":14305,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-04 11:58:42","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20790,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-04 11:59:04","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":11807,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-04 11:59:04","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":4134,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-04 11:59:04","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5159,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:59:05","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":9815,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:59:18","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25707,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:59:18","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":12197,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:59:18","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":37550,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 11:59:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = i\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27929,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-10-04 11:59:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":10651,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-10-04 11:59:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":17043,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-10-04 11:59:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":30965,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:00:00","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17766,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 12:00:36","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1\n j = i","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":15119,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:01:02","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n while i < len(a):\n find_position_of_smallest(a, i).swap(a)\n swap(a, i, j).sort(a)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":13842,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 12:01:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":4860,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:01:32","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":14204,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 12:01:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38668,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 12:01:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5604,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 12:01:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":25164,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-04 12:01:48","func_code":"def sort(a):\n while i < len(a):\n find_position_of_smallest.sort(a)\n swap.sort(a)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":12291,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:01:53","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while j < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":19251,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-04 12:02:12","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":36990,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-04 12:02:12","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":38617,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-04 12:02:14","func_code":"def sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest.sort(a)\n swap.sort(a)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":7360,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:02:43","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n while i < len(a):\n if find_position_of_smallest(a, i).swap(a):\n swap(a, i, j).sort(a)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":23995,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:03:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":24082,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 12:03:11","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":34894,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 12:03:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":28673,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:03:33","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":16772,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:03:54","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":18044,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:03:54","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":18646,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 12:04:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35063,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 12:04:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":6108,"user":"065cc64f-1be3-42fb-9f2e-8280c11aa573","date":"2017-10-04 12:06:42","func_code":"def sort(a):\n b = a\n b = 0\n j = 1\n while j < len(a):\n if a[j] < a[b]:\n p = j\n j = j + 1\n return b","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":12063,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-04 12:06:44","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23348,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-04 12:06:44","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":16961,"user":"065cc64f-1be3-42fb-9f2e-8280c11aa573","date":"2017-10-04 12:06:56","func_code":"def sort(a):\n b = 0\n j = 1\n while j < len(a):\n if a[j] < a[b]:\n p = j\n j = j + 1\n return b","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27201,"user":"065cc64f-1be3-42fb-9f2e-8280c11aa573","date":"2017-10-04 12:06:56","func_code":"def sort(a):\n b = 0\n j = 1\n while j < len(a):\n if a[j] < a[b]:\n p = j\n j = j + 1\n return b","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":37967,"user":"065cc64f-1be3-42fb-9f2e-8280c11aa573","date":"2017-10-04 12:06:56","func_code":"def sort(a):\n b = 0\n j = 1\n while j < len(a):\n if a[j] < a[b]:\n p = j\n j = j + 1\n return b","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":36982,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-04 12:07:30","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":28632,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-04 12:08:28","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":16752,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-04 12:09:07","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5917,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-04 12:10:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":32764,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-04 12:10:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":29783,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-04 12:10:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":41152,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-10-04 12:10:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20643,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-10-04 12:10:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":27803,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-10-04 12:10:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":12879,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:10:52","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":14248,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:11:08","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":28136,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-04 12:11:42","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n l = 0\n while l < len(a):\n p = find_position_of_smallest(a, l)\n swap(a, l, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":5007,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-04 12:12:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n l = 0\n while l < len(a):\n p = find_position_of_smallest(a, l)\n swap(a, l, p)\n l = l + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":35685,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-04 12:12:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n l = 0\n while l < len(a):\n p = find_position_of_smallest(a, l)\n swap(a, l, p)\n l = l + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":28732,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:14:14","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n l = 0\n while l < len(a):\n p = find_position_of_smallest(a, l)\n swap(a, p, l)\n l = l + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":11508,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:14:41","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n l = 0\n while l < len(a):\n p = find_position_of_smallest(a, l)\n swap(a, p, l)\n l = l + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":24613,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:14:41","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n l = 0\n while l < len(a):\n p = find_position_of_smallest(a, l)\n swap(a, p, l)\n l = l + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":20766,"user":"e5dedf13-336d-484f-81bc-d7898f0f002e","date":"2017-10-04 12:22:33","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":23242,"user":"e5dedf13-336d-484f-81bc-d7898f0f002e","date":"2017-10-04 12:22:33","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5534,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:06:07","func_code":"def sort(a):\n a.sort(a)","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":32567,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:19:09","func_code":"def sort(a):\n i = 0\n while i < len(a):\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":907,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:43:08","func_code":"def sort(a):\n i = 0\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[i]\n a[i] = a[n]\n a[n] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":32863,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:43:26","func_code":"def sort(a):\n i = 0\n n = 0\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[i]\n a[i] = a[n]\n a[n] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":11076,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:43:51","func_code":"def sort(a):\n i = 0\n n = 0\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[i]\n a[i] = a[n]\n a[n] = tmp","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":31360,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:44:14","func_code":"def sort(a):\n i = 0\n n = 0\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[i]\n a[i] = a[n]\n a[n] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":13183,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:46:43","func_code":"def sort(a):\n i = 0\n p = 0\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":19469,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:47:59","func_code":"def sort(a):\n i = 0\n p = 0\n while i < len(a):\n if a[i] > a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":15762,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:48:42","func_code":"def sort(a):\n i = 0\n p = 0\n while i > len(a):\n if a[i] > a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":32223,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:48:53","func_code":"def sort(a):\n i = 0\n p = 0\n while i > len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":13622,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:50:03","func_code":"def sort(a):\n i = 1\n p = 0\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39581,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:50:19","func_code":"def sort(a):\n i = 0\n p = 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":17265,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:51:44","func_code":"def sort(a):\n n = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10346,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:52:20","func_code":"def sort(a):\n n = i\n i = i + 1\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":4581,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:57:19","func_code":"def sort(a):\n n = i\n i = i + 1\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[n]\n a[n] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":22445,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:57:50","func_code":"def sort(a):\n i = i + 1\n n = i\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[n]\n a[n] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":25051,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:58:10","func_code":"def sort(a):\n i = 0\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[n]\n a[n] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":25442,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 17:02:28","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21284,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 17:02:28","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":21379,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 17:02:28","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":31209,"user":"557b99ed-3c48-4070-b887-de4b2d06ac8d","date":"2017-10-11 12:00:21","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n swap(a, i, find_position_of_smallest + i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8946,"user":"557b99ed-3c48-4070-b887-de4b2d06ac8d","date":"2017-10-11 12:01:28","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":15847,"user":"557b99ed-3c48-4070-b887-de4b2d06ac8d","date":"2017-10-11 12:01:28","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":36040,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-11-08 06:24:49","func_code":"def reverse(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[len(a) - i - 1])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":27850,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-11-08 06:24:49","func_code":"def reverse(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[len(a) - i - 1])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":14905,"user":"2a5e3eed-41c7-46e6-9bee-3acc21c1f81b","date":"2017-11-08 09:55:26","func_code":"def reverse(a, i):\n i = 0\n lines = sys.stdin.readlines()\n while i < len(a):\n print(lines[i] - 1 - i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":15224,"user":"2a5e3eed-41c7-46e6-9bee-3acc21c1f81b","date":"2017-11-08 09:55:26","func_code":"def reverse(a, i):\n i = 0\n lines = sys.stdin.readlines()\n while i < len(a):\n print(lines[i] - 1 - i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":22801,"user":"2a5e3eed-41c7-46e6-9bee-3acc21c1f81b","date":"2017-11-08 09:55:26","func_code":"def reverse(a, i):\n i = 0\n lines = sys.stdin.readlines()\n while i < len(a):\n print(lines[i] - 1 - i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":5638,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 10:51:43","func_code":"def reverse(n):\n reverse = a[len(a) - i - 1]\n return reverse","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":40328,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 10:52:22","func_code":"def reverse(n):\n reverse = a[len(a) - i - 1]\n return reverse","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":17712,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 10:52:45","func_code":"def reverse(n):\n reverse = a[len(a) - i - 1]\n return reverse","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":1406,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-11-08 11:09:41","func_code":"def reverse(l):\n return l[::-1]","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":37176,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-11-08 11:09:41","func_code":"def reverse(l):\n return l[::-1]","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":31148,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-11-08 11:34:18","func_code":"def reverse(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[i] = tmp","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":308,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-11-08 11:38:54","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":41018,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-11-08 11:38:54","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":8026,"user":"2d5a247c-29b2-4cc2-a956-669a2206edc8","date":"2017-11-08 11:39:55","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":37066,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 11:44:18","func_code":"def reverse(a):\n a = a[::a - 1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":18221,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 11:44:39","func_code":"def reverse(a):\n a[::a - 1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":13955,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 11:46:08","func_code":"def reverse(a):\n a = a[::a - 1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":27993,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 11:47:21","func_code":"def reverse(i, j, k):\n a = a[::-1]\n print(a)","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":2731,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 11:47:38","func_code":"def reverse(a):\n a = a[::-1]\n print(a)","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":28616,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 11:48:06","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":15708,"user":"4205f21d-1c6e-499a-a25c-83a2d9d5ad93","date":"2017-11-08 11:48:18","func_code":"def reverse(string):\n results = string[::-1]\n return string[::-1]","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":26924,"user":"4205f21d-1c6e-499a-a25c-83a2d9d5ad93","date":"2017-11-08 11:48:18","func_code":"def reverse(string):\n results = string[::-1]\n return string[::-1]","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":4512,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 11:48:33","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":576,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 11:48:33","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":21193,"user":"ea7c3666-b2a8-45fc-9644-69fa2415de49","date":"2017-11-08 11:53:51","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":25555,"user":"ea7c3666-b2a8-45fc-9644-69fa2415de49","date":"2017-11-08 11:53:51","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":26290,"user":"ea7c3666-b2a8-45fc-9644-69fa2415de49","date":"2017-11-08 11:53:51","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":12670,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-11-08 12:00:34","func_code":"def reverse(a):\n i = 0\n a = a[a:-i - 1]\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":34708,"user":"2d5a247c-29b2-4cc2-a956-669a2206edc8","date":"2017-11-08 12:01:02","func_code":"def reverse(a):\n while i < len(a):\n return len(a) - 1","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":18225,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:03:04","func_code":"def reverse(a):\n i = 0\n j = len(a)\n while i < len(a):\n tmp = a[i]\n a[i] = a[j - i]\n a[j - i] = tmp\n print(a)","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":6354,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 12:03:23","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = a[i]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":36980,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-11-08 12:04:01","func_code":"def reverse(a_string):\n new_string = ''\n index = len(a_string)\n while index:\n index -= 1\n new_string += a_string[index]\n return new_string","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":6583,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 12:04:12","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i]\n a[len(a) - i] = a[i]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":23454,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:04:58","func_code":"def reverse(a):\n i = 0\n j = len(a)\n while i < len(a):\n tmp = a[i]\n a[i] = a[j - i]\n a[j - i] = tmp\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":33738,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-11-08 12:05:06","func_code":"def reverse(test):\n n = len(test)\n x = ''\n for i in range(n - 1, -1, -1):\n x += test[i]\n return x","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":13862,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-11-08 12:05:06","func_code":"def reverse(test):\n n = len(test)\n x = ''\n for i in range(n - 1, -1, -1):\n x += test[i]\n return x","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":29785,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:05:40","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i]\n a[len(a) - i] = tmp\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":314,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 12:05:41","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = a[i]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":19741,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 12:06:51","func_code":"def reverse(a):\n a = []\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = a[i]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":31938,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 12:06:51","func_code":"def reverse(a):\n a = []\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = a[i]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":2391,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:08:51","func_code":"def reverse(a):\n a = []\n i = 0\n rev = a[len(a) - i - 1]\n return rev","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":34704,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:09:25","func_code":"def reverse(a):\n rev = a[len(a) - i - 1]\n return rev","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":34251,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:09:46","func_code":"def reverse(a):\n i = 0\n rev = a[len(a) - i - 1]\n return rev","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":30446,"user":"2d5a247c-29b2-4cc2-a956-669a2206edc8","date":"2017-11-08 12:10:38","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":12651,"user":"2d5a247c-29b2-4cc2-a956-669a2206edc8","date":"2017-11-08 12:10:38","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":4809,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:14:45","func_code":"def reverse(a):\n print(reverse(a[i]))","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":16905,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:14:59","func_code":"def reverse(a):\n print(reverse(a))","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":17088,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:14:59","func_code":"def reverse(a):\n print(reverse(a))","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":25370,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:14:59","func_code":"def reverse(a):\n print(reverse(a))","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":41682,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-11-08 12:26:29","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":15213,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:31:30","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i]\n a[len(a) - i] = tmp\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":13346,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:32:04","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":21871,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:32:43","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n print(a.rstrip())","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":31897,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:39:38","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n print(a.rstrip())\n print(tmp)\n print(a[i])","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":23066,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:40:36","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n print(a.rstrip())","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":30000,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:41:05","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":13915,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:42:21","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":5441,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:43:09","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":9937,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:43:09","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":32121,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-11-08 12:45:35","func_code":"def reverse(a, i, j):\n a = []\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":18033,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-11-08 12:46:22","func_code":"def reverse(a, i, j):\n a = []\n i = 0\n j = 0\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":10921,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-09 12:06:17","func_code":"def reverse(n):\n i = 0\n while i < len(a):\n print(n[len(n) - (i + 1)])\n i = i + 1","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":32892,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-09 12:08:08","func_code":"def reverse(n):\n i = 0\n while i < len(n):\n print(n[len(n) - (i + 1)])\n i = i + 1","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":36302,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-09 12:18:55","func_code":"def reverse(n):\n a = []\n i = 0\n while i < len(n):\n a.append(n)\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":22970,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-09 12:19:35","func_code":"def reverse(n):\n i = 0\n while i < len(n):\n print(n)\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":29476,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-09 12:19:56","func_code":"def reverse(n):\n a = []\n i = 0\n while i < len(n):\n print(n)\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":12141,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-09 12:36:04","func_code":"def reverse(n):\n a = []\n i = 0\n j = len(n) - 1\n while i < len(n) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":7086,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-11-14 11:02:47","func_code":"def reverse(a):\n b = a[::-1]\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":32746,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-11-14 11:02:47","func_code":"def reverse(a):\n b = a[::-1]\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":41365,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-11-14 11:02:47","func_code":"def reverse(a):\n b = a[::-1]\n return b","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":29350,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-14 15:33:26","func_code":"def reverse(n):\n i = 0\n while i < len(n) \/ 2:\n print(n[len(n) - i - 1])\n i = i + 1","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":15609,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-14 15:38:48","func_code":"def reverse(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":26150,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-14 15:39:15","func_code":"def reverse(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a.rstrip()","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":16554,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-14 15:39:43","func_code":"def reverse(a, i, j):\n a = []\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":16231,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-14 15:39:43","func_code":"def reverse(a, i, j):\n a = []\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":29636,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-14 15:39:43","func_code":"def reverse(a, i, j):\n a = []\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":10085,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-11-14 15:47:16","func_code":"def reverse(a):\n temp = []\n i = 0\n while i != len(a):\n temp.append(len(a) - 1)\n i = i + 1\n a = temp\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":11384,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-11-14 15:47:36","func_code":"def reverse(a):\n temp = []\n i = 0\n while i != len(a):\n temp.append(len(a) - i)\n i = i + 1\n a = temp\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":34899,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-11-14 15:48:07","func_code":"def reverse(a):\n temp = []\n i = 0\n while i != len(a):\n temp.append(a[len(a) - i])\n i = i + 1\n a = temp\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":false} -{"submission_id":24963,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-11-14 15:48:27","func_code":"def reverse(a):\n temp = []\n i = 0\n while i != len(a):\n temp.append(a[len(a) - i - 1])\n i = i + 1\n a = temp\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":38042,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-11-14 16:00:34","func_code":"def reverse(a):\n temp = []\n i = 0\n while i != len(a):\n temp.append(a[len(a) - i - 1])\n i = i + 1\n a = temp\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":3539,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-11-14 16:00:34","func_code":"def reverse(a):\n temp = []\n i = 0\n while i != len(a):\n temp.append(a[len(a) - i - 1])\n i = i + 1\n a = temp\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":9061,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 12:50:29","func_code":"def selection_sort(a):\n i = 0","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":40858,"user":"4a7eb3c1-23d7-4547-a3af-8d940245a9a3","date":"2017-12-02 13:11:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":3530,"user":"4a7eb3c1-23d7-4547-a3af-8d940245a9a3","date":"2017-12-02 13:11:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":12805,"user":"4a7eb3c1-23d7-4547-a3af-8d940245a9a3","date":"2017-12-02 13:11:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":31647,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 13:38:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":34340,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 13:38:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":18622,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 13:43:03","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27868,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 13:43:03","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":41334,"user":"9083bfed-4cf9-4111-9300-37bfea094de1","date":"2017-12-02 22:43:45","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":33641,"user":"9083bfed-4cf9-4111-9300-37bfea094de1","date":"2017-12-02 22:43:45","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":40561,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:17:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = a[i]\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":39271,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:18:09","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = a[i]\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":28032,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:18:44","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":200,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:18:44","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":36635,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:25:28","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if j < p:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":41931,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:26:24","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":4830,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:26:24","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":20845,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-12-03 19:08:31","func_code":"def union(a, b):\n a = a + b\n seen = {}\n c = []\n i = 0\n while i < len(a):\n if a[i] not in seen:\n seen[a[i]] = True\n i = i + 1\n for number in seen:\n c.append(number)\n return c","func_name":"union","assignment_id":"sets.py_ca277_union","academic_year":2016,"module":"ca277","test":"assert union([],[])==[] and union([25785],[25785])==[25785] and union([-90, 21135, 29310, -8059, 7114, -90, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996],[5, -9316, 7379237229304681733])==[-90, 21135, 29310, -8059, 7114, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996, 5, -9316, 7379237229304681733]","description":"Merge two lists into a single one.","correct":true} -{"submission_id":34065,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-12-03 19:08:31","func_code":"def union(a, b):\n a = a + b\n seen = {}\n c = []\n i = 0\n while i < len(a):\n if a[i] not in seen:\n seen[a[i]] = True\n i = i + 1\n for number in seen:\n c.append(number)\n return c","func_name":"union","assignment_id":"sets.py_ca277_union","academic_year":2016,"module":"ca277","test":"assert union([],[])==[] and union([25785],[25785])==[25785] and union([-90, 21135, 29310, -8059, 7114, -90, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996],[5, -9316, 7379237229304681733])==[-90, 21135, 29310, -8059, 7114, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996, 5, -9316, 7379237229304681733]","description":"Merge two lists into a single one.","correct":true} -{"submission_id":19545,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-12-03 19:08:31","func_code":"def intersection(a, b):\n seen = {}\n append = {}\n c = []\n i = 0\n while i < len(a):\n seen[a[i]] = True\n i = i + 1\n i = 0\n while i < len(b):\n if b[i] in seen and b[i] not in append:\n c.append(b[i])\n append[b[i]] = True\n i = i + 1\n return c","func_name":"intersection","assignment_id":"sets.py_ca277_intersection","academic_year":2016,"module":"ca277","test":"assert intersection([],[])==[] and intersection([20052, 20052, -9991],[102, 20052, -9991])==[20052, -9991] and intersection([38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794],[38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794])==[38908273694008580353068229963801163341, 59, -38, 28239, -2723, 24559, -5794]","description":"Return the elements which are in both lists.","correct":true} -{"submission_id":16824,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-12-03 19:08:31","func_code":"def intersection(a, b):\n seen = {}\n append = {}\n c = []\n i = 0\n while i < len(a):\n seen[a[i]] = True\n i = i + 1\n i = 0\n while i < len(b):\n if b[i] in seen and b[i] not in append:\n c.append(b[i])\n append[b[i]] = True\n i = i + 1\n return c","func_name":"intersection","assignment_id":"sets.py_ca277_intersection","academic_year":2016,"module":"ca277","test":"assert intersection([],[])==[] and intersection([20052, 20052, -9991],[102, 20052, -9991])==[20052, -9991] and intersection([38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794],[38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794])==[38908273694008580353068229963801163341, 59, -38, 28239, -2723, 24559, -5794]","description":"Return the elements which are in both lists.","correct":true} -{"submission_id":2358,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:28:48","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n a[i] = a[-i - 1]\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":1988,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:29:23","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n a[i] = a[len(a) - i - 1]\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":31189,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:32:20","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[-i - 1]\n a[-i - 1] = tmp\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":13511,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:35:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(i, -i - 1)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":6993,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:35:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, -i - 1)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":31733,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:35:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, -i - 1)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":17914,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:41:04","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j += 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":6720,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:44:23","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":21588,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:45:55","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":13468,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:45:55","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27665,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:45:55","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":2873,"user":"334b0f61-5fa3-43cf-8691-29f975dd7270","date":"2017-12-04 12:46:48","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n b.append(a[len(a) - 1 - i])\n i = i + 1\n a = b\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":21895,"user":"334b0f61-5fa3-43cf-8691-29f975dd7270","date":"2017-12-04 12:46:48","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n b.append(a[len(a) - 1 - i])\n i = i + 1\n a = b\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":7272,"user":"334b0f61-5fa3-43cf-8691-29f975dd7270","date":"2017-12-04 12:46:48","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n b.append(a[len(a) - 1 - i])\n i = i + 1\n a = b\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":30760,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-12-04 17:19:04","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":30323,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-12-04 17:19:04","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse.py_ca277_reverse","academic_year":2016,"module":"ca277","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","description":"Reverse a list of elements.","correct":true} -{"submission_id":29776,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-12-04 17:19:04","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":34171,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-12-04 17:28:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":5782,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-12-04 17:28:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":1099,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-12-04 19:48:42","func_code":"def find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":2852,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-12-04 19:48:42","func_code":"def find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"selection_sort.py_ca277_sort","academic_year":2016,"module":"ca277","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":18108,"user":"0d8d49aa-e213-4ab4-bcc1-440a0397585c","date":"2017-12-04 22:23:55","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":34408,"user":"0d8d49aa-e213-4ab4-bcc1-440a0397585c","date":"2017-12-04 22:23:55","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":35039,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-12-05 11:31:50","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":11405,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-12-05 11:31:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":2841,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-12-05 11:32:00","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":10005,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-12-05 11:44:53","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":19465,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-12-05 11:45:22","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22764,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-12-05 11:45:22","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":29736,"user":"6bdfefac-1fa3-44c6-b066-9e1536e0210e","date":"2017-12-05 12:52:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":36725,"user":"7d992268-b79a-4106-8fbb-4f53742d117d","date":"2017-12-05 12:55:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":23239,"user":"7d992268-b79a-4106-8fbb-4f53742d117d","date":"2017-12-05 12:56:09","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":21374,"user":"7d992268-b79a-4106-8fbb-4f53742d117d","date":"2017-12-05 12:56:19","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":16900,"user":"7d992268-b79a-4106-8fbb-4f53742d117d","date":"2017-12-05 12:57:45","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":42357,"user":"7d992268-b79a-4106-8fbb-4f53742d117d","date":"2017-12-05 12:57:45","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":4064,"user":"a8d7ba55-2066-48ff-a791-991413f703dc","date":"2017-12-05 13:07:37","func_code":"def bsearch(a, q):\n lo = 0\n hi = len(a)\n while lo < hi:\n mid = (lo + hi) \/ 2\n if a[mid] < q:\n lo = mid + 1\n else:\n hi = mid\n return lo","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":6481,"user":"a8d7ba55-2066-48ff-a791-991413f703dc","date":"2017-12-05 13:07:37","func_code":"def bsearch(a, q):\n lo = 0\n hi = len(a)\n while lo < hi:\n mid = (lo + hi) \/ 2\n if a[mid] < q:\n lo = mid + 1\n else:\n hi = mid\n return lo","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1141,"user":"bda058db-eb82-407a-b3b2-8f24355f1fa5","date":"2017-12-05 13:11:36","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n print(low)","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":15850,"user":"8d21baf9-a7ac-4132-92e0-a1002f0c04a9","date":"2017-12-05 13:12:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":7626,"user":"8d21baf9-a7ac-4132-92e0-a1002f0c04a9","date":"2017-12-05 13:12:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":25273,"user":"bda058db-eb82-407a-b3b2-8f24355f1fa5","date":"2017-12-05 13:14:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":12032,"user":"bda058db-eb82-407a-b3b2-8f24355f1fa5","date":"2017-12-05 13:14:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40618,"user":"9f673df6-fcfd-4d07-b0dd-1f553c38f25b","date":"2017-12-05 13:17:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":38519,"user":"9f673df6-fcfd-4d07-b0dd-1f553c38f25b","date":"2017-12-05 13:17:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3355,"user":"dcc424e7-96ab-4451-ad16-597d84c13c2e","date":"2017-12-05 13:18:06","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":16050,"user":"dcc424e7-96ab-4451-ad16-597d84c13c2e","date":"2017-12-05 13:20:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":26626,"user":"dcc424e7-96ab-4451-ad16-597d84c13c2e","date":"2017-12-05 13:21:45","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3120,"user":"dcc424e7-96ab-4451-ad16-597d84c13c2e","date":"2017-12-05 13:22:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return mid","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":41772,"user":"dcc424e7-96ab-4451-ad16-597d84c13c2e","date":"2017-12-05 13:23:14","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":11204,"user":"dcc424e7-96ab-4451-ad16-597d84c13c2e","date":"2017-12-05 13:23:14","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":4681,"user":"7c3b55b1-74b7-4570-8484-5a4354d497aa","date":"2017-12-05 13:44:29","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":35087,"user":"7c3b55b1-74b7-4570-8484-5a4354d497aa","date":"2017-12-05 13:44:29","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9413,"user":"104b03f1-1241-495d-996a-ba8f4a26b8bc","date":"2017-12-05 13:52:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + high \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":37078,"user":"6bdfefac-1fa3-44c6-b066-9e1536e0210e","date":"2017-12-05 13:54:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":17943,"user":"104b03f1-1241-495d-996a-ba8f4a26b8bc","date":"2017-12-05 13:55:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + high \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":25012,"user":"104b03f1-1241-495d-996a-ba8f4a26b8bc","date":"2017-12-05 13:56:03","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":41857,"user":"104b03f1-1241-495d-996a-ba8f4a26b8bc","date":"2017-12-05 13:56:03","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":38654,"user":"f4380e0a-3bfd-44c6-b455-fe1018a45321","date":"2017-12-05 13:57:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if q > a[mid]:\n assert a[low - 1] < q\n low = mid + 1\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9179,"user":"6bdfefac-1fa3-44c6-b066-9e1536e0210e","date":"2017-12-05 13:58:32","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":24873,"user":"6bdfefac-1fa3-44c6-b066-9e1536e0210e","date":"2017-12-05 13:58:32","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":23371,"user":"a998fa29-b3b1-437f-9555-da670b1ae43b","date":"2017-12-05 13:59:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":28008,"user":"a998fa29-b3b1-437f-9555-da670b1ae43b","date":"2017-12-05 13:59:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18062,"user":"f4380e0a-3bfd-44c6-b455-fe1018a45321","date":"2017-12-05 13:59:51","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if q > a[mid]:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":34200,"user":"f4380e0a-3bfd-44c6-b455-fe1018a45321","date":"2017-12-05 14:05:03","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if q > a[mid]:\n assert a[low - 1] < q\n low = mid + 1\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":25482,"user":"156114dd-8a1c-4e95-a7b3-fb54488e2dcf","date":"2017-12-05 14:05:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":38838,"user":"156114dd-8a1c-4e95-a7b3-fb54488e2dcf","date":"2017-12-05 14:05:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":24344,"user":"539a3d07-c706-42ed-bbbe-db66980d170f","date":"2017-12-05 14:05:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18810,"user":"539a3d07-c706-42ed-bbbe-db66980d170f","date":"2017-12-05 14:05:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":5026,"user":"7eb02a08-e561-4e33-a415-6df6cc4ff4a9","date":"2017-12-05 14:05:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8812,"user":"7eb02a08-e561-4e33-a415-6df6cc4ff4a9","date":"2017-12-05 14:05:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":512,"user":"9dea5530-0f82-4127-b25f-20c784224a03","date":"2017-12-05 14:06:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":26955,"user":"9dea5530-0f82-4127-b25f-20c784224a03","date":"2017-12-05 14:06:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":12236,"user":"f4380e0a-3bfd-44c6-b455-fe1018a45321","date":"2017-12-05 14:06:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if q > a[mid]:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":19057,"user":"f4380e0a-3bfd-44c6-b455-fe1018a45321","date":"2017-12-05 14:06:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if q > a[mid]:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":27557,"user":"85db1d22-a87d-4132-bd9a-e07bf9282015","date":"2017-12-05 14:06:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":38976,"user":"85db1d22-a87d-4132-bd9a-e07bf9282015","date":"2017-12-05 14:06:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":25192,"user":"75fca52d-a61c-4d91-946c-d376c5569767","date":"2017-12-05 14:06:50","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":10998,"user":"75fca52d-a61c-4d91-946c-d376c5569767","date":"2017-12-05 14:06:50","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":7580,"user":"0412928d-97c6-46f2-980b-7d98214b9765","date":"2017-12-05 14:07:17","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22311,"user":"bb523aa9-260c-45a0-8676-45ed3ab261ee","date":"2017-12-05 14:08:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n print(low)","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":13072,"user":"0412928d-97c6-46f2-980b-7d98214b9765","date":"2017-12-05 14:08:23","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":36596,"user":"0412928d-97c6-46f2-980b-7d98214b9765","date":"2017-12-05 14:08:23","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":31274,"user":"1e76a94c-89e1-4ef2-b3bb-9e98e7be1a2c","date":"2017-12-05 14:09:06","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":26187,"user":"b799d072-e18e-40e6-96cb-77c78c9e2a0f","date":"2017-12-05 14:09:07","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < p:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":13349,"user":"1e76a94c-89e1-4ef2-b3bb-9e98e7be1a2c","date":"2017-12-05 14:09:34","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":7465,"user":"b799d072-e18e-40e6-96cb-77c78c9e2a0f","date":"2017-12-05 14:09:35","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":41495,"user":"bb62ca90-d7ec-42bb-b255-0f55492691ea","date":"2017-12-05 14:09:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9008,"user":"bb62ca90-d7ec-42bb-b255-0f55492691ea","date":"2017-12-05 14:09:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":996,"user":"60b76a41-ddf8-4d27-a286-8da8c4e298cd","date":"2017-12-05 14:09:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":6355,"user":"60b76a41-ddf8-4d27-a286-8da8c4e298cd","date":"2017-12-05 14:09:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":7016,"user":"142cacda-ba1b-469c-9b25-8603a78324c9","date":"2017-12-05 14:10:03","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":20369,"user":"1e76a94c-89e1-4ef2-b3bb-9e98e7be1a2c","date":"2017-12-05 14:10:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22267,"user":"d86203fa-9e1b-4fc0-a3a6-b40a78065d80","date":"2017-12-05 14:10:22","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1459,"user":"d86203fa-9e1b-4fc0-a3a6-b40a78065d80","date":"2017-12-05 14:10:22","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8492,"user":"1e76a94c-89e1-4ef2-b3bb-9e98e7be1a2c","date":"2017-12-05 14:10:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":276,"user":"1e76a94c-89e1-4ef2-b3bb-9e98e7be1a2c","date":"2017-12-05 14:10:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":38204,"user":"3f0a2ff2-f068-43e9-9a21-42850d31b8d3","date":"2017-12-05 14:11:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":7457,"user":"3f0a2ff2-f068-43e9-9a21-42850d31b8d3","date":"2017-12-05 14:11:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":27906,"user":"bb523aa9-260c-45a0-8676-45ed3ab261ee","date":"2017-12-05 14:12:13","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] <= q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":2827,"user":"16011fd4-f5e2-4c2c-b014-86692ff746d5","date":"2017-12-05 14:12:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":2261,"user":"142cacda-ba1b-469c-9b25-8603a78324c9","date":"2017-12-05 14:13:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":784,"user":"27057d38-c1f9-4b8d-a26e-f287a0546d33","date":"2017-12-05 14:13:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":7867,"user":"9d69cd84-adaa-42a8-9530-416762b34c13","date":"2017-12-05 14:13:12","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":17737,"user":"9d69cd84-adaa-42a8-9530-416762b34c13","date":"2017-12-05 14:13:12","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":19912,"user":"f734d662-6b82-46af-93a9-92b490e12476","date":"2017-12-05 14:13:16","func_code":"def bsearch(a, q):\n low = 0\n high = 0\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":19882,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:13:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n mid = 0\n i = 0\n if q in a:\n while a[i] != q:\n i += 1\n print(i)\n else:\n while low != high:\n mid = (high + low) \/ 2\n if q[mid] < low:\n high = mid\n else:\n low = mid\n print(low)","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":14375,"user":"4a7eb3c1-23d7-4547-a3af-8d940245a9a3","date":"2017-12-05 14:13:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":23680,"user":"4a7eb3c1-23d7-4547-a3af-8d940245a9a3","date":"2017-12-05 14:13:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":20052,"user":"f734d662-6b82-46af-93a9-92b490e12476","date":"2017-12-05 14:14:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":14979,"user":"f734d662-6b82-46af-93a9-92b490e12476","date":"2017-12-05 14:14:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":25179,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-05 14:14:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n assert a[low - i] < q\n low = mid + 1\n else:\n assert q <= a[high]\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8531,"user":"7d63d843-7e5d-4c24-a378-1056c311dfd2","date":"2017-12-05 14:15:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":27594,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-05 14:15:12","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n assert a[low - i] < q\n low = mid + 1\n else:\n assert q <= a[high]\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":610,"user":"1ea53a09-863b-4396-bbe3-e75221238368","date":"2017-12-05 14:15:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":42049,"user":"142cacda-ba1b-469c-9b25-8603a78324c9","date":"2017-12-05 14:15:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":33125,"user":"142cacda-ba1b-469c-9b25-8603a78324c9","date":"2017-12-05 14:15:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40034,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-05 14:15:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":13244,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-05 14:15:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":32382,"user":"1ea53a09-863b-4396-bbe3-e75221238368","date":"2017-12-05 14:15:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":13588,"user":"1ea53a09-863b-4396-bbe3-e75221238368","date":"2017-12-05 14:15:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":4673,"user":"b799d072-e18e-40e6-96cb-77c78c9e2a0f","date":"2017-12-05 14:15:56","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":12256,"user":"bb523aa9-260c-45a0-8676-45ed3ab261ee","date":"2017-12-05 14:16:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n print(low)","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9169,"user":"bb523aa9-260c-45a0-8676-45ed3ab261ee","date":"2017-12-05 14:16:47","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":32233,"user":"bb523aa9-260c-45a0-8676-45ed3ab261ee","date":"2017-12-05 14:16:47","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":36874,"user":"20997107-3eee-4a62-bc0c-56e29ffe0c3d","date":"2017-12-05 14:17:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n assert a[mid + 1 - 1] < q\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":23559,"user":"20997107-3eee-4a62-bc0c-56e29ffe0c3d","date":"2017-12-05 14:17:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n assert a[mid + 1 - 1] < q\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":35657,"user":"57b690d2-56f4-4fcf-abf7-8719f8802aae","date":"2017-12-05 14:17:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= [high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":30380,"user":"57b690d2-56f4-4fcf-abf7-8719f8802aae","date":"2017-12-05 14:17:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= [high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":10888,"user":"00ee78cc-7a00-47a7-85bb-9c524dad656c","date":"2017-12-05 14:18:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":33568,"user":"e4629340-a577-4a87-bbfb-8adf98c283ef","date":"2017-12-05 14:18:33","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high - low) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":14977,"user":"d0e5b214-932e-4ec6-ae62-66baacab8b6c","date":"2017-12-05 14:19:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":28124,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:19:06","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] <= q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":17085,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:19:15","func_code":"def bsearch(arr, tgt):\n lo = 0\n hi = len(arr)\n while lo != hi:\n mid = (lo + hi) \/ 2\n if arr[mid] < tgt:\n lo = mid + 1\n else:\n hi = mid - 1\n return (lo + hi) \/\/ 2 + 1 if arr[-1] == tgt else (lo + hi) \/\/ 2","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1996,"user":"e4629340-a577-4a87-bbfb-8adf98c283ef","date":"2017-12-05 14:19:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":11410,"user":"e4629340-a577-4a87-bbfb-8adf98c283ef","date":"2017-12-05 14:19:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":710,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:19:58","func_code":"def bsearch(arr, tgt):\n lo = 0\n hi = len(arr)\n while lo <= hi:\n mid = (lo + hi) \/ 2\n if arr[mid] < tgt:\n lo = mid + 1\n else:\n hi = mid - 1\n return (lo + hi) \/ 2","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":33818,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:20:15","func_code":"def bsearch(arr, tgt):\n lo = 0\n hi = len(arr)\n while lo != hi:\n mid = (lo + hi) \/ 2\n if arr[mid] < tgt:\n lo = mid + 1\n else:\n hi = mid - 1\n return (lo + hi) \/ 2","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3050,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:20:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n while True:\n if high < low:\n return -1\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n elif a[mid] > q:\n high = mid - 1\n else:\n return mid","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":32397,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:20:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] <= q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":27535,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:21:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] <= q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":21101,"user":"5aa80855-56ed-43aa-9b33-19faef108ec0","date":"2017-12-05 14:21:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":31513,"user":"5aa80855-56ed-43aa-9b33-19faef108ec0","date":"2017-12-05 14:21:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":23322,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:21:23","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while True:\n if high < low:\n return -1\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n elif a[mid] > q:\n high = mid - 1\n else:\n return mid","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9635,"user":"e425d75d-4acb-48c4-b113-9d72b4603c15","date":"2017-12-05 14:21:26","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if q > a[mid]:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":17661,"user":"e425d75d-4acb-48c4-b113-9d72b4603c15","date":"2017-12-05 14:21:26","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if q > a[mid]:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":34772,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:21:36","func_code":"def bsearch(arr, tgt):\n lo = 0\n hi = len(arr)\n while lo <= hi and (low + hi) \/ 2 < len(arr):\n mid = (lo + hi) \/ 2\n if arr[mid] < tgt:\n lo = mid + 1\n else:\n hi = mid - 1\n return (lo + hi) \/ 2","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":26307,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-05 14:21:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if q > a[mid]:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3275,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-05 14:21:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if q > a[mid]:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":16256,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:21:49","func_code":"def bsearch(arr, tgt):\n lo = 0\n hi = len(arr)\n while lo <= hi and (lo + hi) \/ 2 < len(arr):\n mid = (lo + hi) \/ 2\n if arr[mid] < tgt:\n lo = mid + 1\n else:\n hi = mid - 1\n return (lo + hi) \/ 2","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18490,"user":"2f42085d-bb24-498f-9d99-42137e03966f","date":"2017-12-05 14:21:50","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":27141,"user":"2f42085d-bb24-498f-9d99-42137e03966f","date":"2017-12-05 14:21:50","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":39896,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:22:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n mid = 0\n i = 0\n if q in a:\n while a[i] != q:\n i += 1\n print(i)\n else:\n while low != high:\n mid = (high + low) \/ 2\n if a[mid] < low:\n high = mid\n else:\n low = mid\n print(low)","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18665,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:22:33","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n while True:\n if high < low:\n return -1\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n return mid","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40418,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:22:35","func_code":"def bsearch(arr, tgt):\n lo = 0\n hi = len(arr)\n while lo <= hi and (lo + hi) \/ 2 < len(arr):\n mid = (lo + hi) \/ 2\n if arr[mid] < tgt:\n lo = mid + 1\n else:\n hi = mid - 1\n return (lo + hi) \/ 2 + 1","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":26857,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:22:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n i = 0\n if q in a:\n while a[i] != q:\n i += 1\n print(i)","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18240,"user":"d0e5b214-932e-4ec6-ae62-66baacab8b6c","date":"2017-12-05 14:23:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":2156,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-05 14:23:38","func_code":"def bsearch(a, q):\n A = False\n found = A\n newSet = q\n while found != True or newSet > 0:\n midpoint = int(len(newSet) \/ 2)\n if a < newSet[midpoint]:\n found = A\n newSet = newSet[:midpoint]\n elif a > newSet[midpoint]:\n found = A\n newSet = newSet[midpoint:]\n elif a == newSet[midpoint]:\n found = True\n return found","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1327,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:23:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n i = 0\n if q in a:\n while a[i] != q:\n i += 1\n print(i)\n else:\n while low != high:\n mid = (high + low) \/ 2\n if a[mid] < low:\n high = mid\n else:\n low = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":24103,"user":"73d23f7d-b20e-4105-a1b6-6760045cdf33","date":"2017-12-05 14:24:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1518,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:24:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] <= q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":13280,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:24:29","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n i = 0\n while low != high:\n mid = (high + low) \/ 2\n if a[mid] < low:\n high = mid\n else:\n low = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":11450,"user":"1d4a4b3b-be4e-49dc-96cc-fceb60ad22a1","date":"2017-12-05 14:24:48","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low == 0 and a[low - 1] < q\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":26424,"user":"30a4c165-17bc-4bdf-a096-e2a252a403eb","date":"2017-12-05 14:24:51","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":5086,"user":"73d23f7d-b20e-4105-a1b6-6760045cdf33","date":"2017-12-05 14:25:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":13392,"user":"73d23f7d-b20e-4105-a1b6-6760045cdf33","date":"2017-12-05 14:25:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18758,"user":"8487432c-a440-40f5-afcb-ad0e762b9edb","date":"2017-12-05 14:25:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = low\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":28843,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:25:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n i = 0\n while low != high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n high = mid\n else:\n low = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":35635,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:25:36","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n while low != high:\n if high < low:\n return -1\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n return mid","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":23081,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:26:03","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":5603,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:26:03","func_code":"def bsearch(a, t):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < t:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":26146,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:26:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n i = 0\n while low != high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n high = mid\n else:\n low = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":30689,"user":"8487432c-a440-40f5-afcb-ad0e762b9edb","date":"2017-12-05 14:26:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = low\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8545,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:26:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":12235,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:26:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":26180,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:26:15","func_code":"def bsearch(a, t):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < t:\n low = mid + 1\n else:\n high = mid - 1\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":25654,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:26:27","func_code":"def bsearch(a, t):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < t:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22590,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:26:27","func_code":"def bsearch(a, t):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < t:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":36171,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-05 14:26:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n else:\n mid = low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":5615,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:26:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n return mid","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":32188,"user":"d0af1b08-7254-49f0-8cc4-d63a85c9199d","date":"2017-12-05 14:26:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":12572,"user":"36685ead-53f8-40af-a908-4c048278dc6b","date":"2017-12-05 14:26:49","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":6227,"user":"36685ead-53f8-40af-a908-4c048278dc6b","date":"2017-12-05 14:26:49","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":37123,"user":"d0af1b08-7254-49f0-8cc4-d63a85c9199d","date":"2017-12-05 14:27:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":28600,"user":"d0af1b08-7254-49f0-8cc4-d63a85c9199d","date":"2017-12-05 14:27:26","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":34883,"user":"d0af1b08-7254-49f0-8cc4-d63a85c9199d","date":"2017-12-05 14:27:26","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":17542,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:27:45","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = low + 1\n else:\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":29094,"user":"30a4c165-17bc-4bdf-a096-e2a252a403eb","date":"2017-12-05 14:27:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8696,"user":"30a4c165-17bc-4bdf-a096-e2a252a403eb","date":"2017-12-05 14:27:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":42340,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-05 14:27:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid + 1] < q:\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n else:\n mid = low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40736,"user":"d0e5b214-932e-4ec6-ae62-66baacab8b6c","date":"2017-12-05 14:28:00","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":37703,"user":"d0e5b214-932e-4ec6-ae62-66baacab8b6c","date":"2017-12-05 14:28:00","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":5174,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-05 14:28:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8544,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-05 14:28:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":39944,"user":"b799d072-e18e-40e6-96cb-77c78c9e2a0f","date":"2017-12-05 14:29:11","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8797,"user":"b799d072-e18e-40e6-96cb-77c78c9e2a0f","date":"2017-12-05 14:29:11","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":7270,"user":"61106f0d-7c7b-4b7a-a3d3-5ba1af9aacf4","date":"2017-12-05 14:30:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if low < q:\n low = mid + 1\n else:\n high = mid\n print(low)","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3173,"user":"831aaa20-0b62-4198-b323-52fc0aa8363b","date":"2017-12-05 14:31:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n m = (low + high) \/ 2\n if a[m] < q:\n low = m + 1\n else:\n high = m\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":818,"user":"831aaa20-0b62-4198-b323-52fc0aa8363b","date":"2017-12-05 14:31:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n m = (low + high) \/ 2\n if a[m] < q:\n low = m + 1\n else:\n high = m\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":13540,"user":"5bdbfa0a-a632-46ed-9ff7-06f5062efb09","date":"2017-12-05 14:31:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9407,"user":"5bdbfa0a-a632-46ed-9ff7-06f5062efb09","date":"2017-12-05 14:31:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":23542,"user":"27057d38-c1f9-4b8d-a26e-f287a0546d33","date":"2017-12-05 14:31:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":24190,"user":"27057d38-c1f9-4b8d-a26e-f287a0546d33","date":"2017-12-05 14:31:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3886,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:32:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1975,"user":"0f25ed97-3bfd-4793-bb56-26c57236aeda","date":"2017-12-05 14:32:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n elif a[mid] >= q:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":29982,"user":"0f25ed97-3bfd-4793-bb56-26c57236aeda","date":"2017-12-05 14:32:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n elif a[mid] >= q:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":41657,"user":"16011fd4-f5e2-4c2c-b014-86692ff746d5","date":"2017-12-05 14:32:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":16926,"user":"16011fd4-f5e2-4c2c-b014-86692ff746d5","date":"2017-12-05 14:32:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":17735,"user":"61106f0d-7c7b-4b7a-a3d3-5ba1af9aacf4","date":"2017-12-05 14:33:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if low < q:\n low = low + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":23424,"user":"fc726678-a7a5-405b-bc49-844b42ef4a2b","date":"2017-12-05 14:33:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22610,"user":"fc726678-a7a5-405b-bc49-844b42ef4a2b","date":"2017-12-05 14:33:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18754,"user":"8487432c-a440-40f5-afcb-ad0e762b9edb","date":"2017-12-05 14:33:53","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":17037,"user":"8487432c-a440-40f5-afcb-ad0e762b9edb","date":"2017-12-05 14:33:53","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":10061,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-05 14:34:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":10397,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-05 14:34:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":39537,"user":"2b5f9b04-bd61-4108-b289-84a2c1002a82","date":"2017-12-05 14:34:49","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":35037,"user":"a758f933-ec7a-444d-b3d2-f685ac9d9563","date":"2017-12-05 14:35:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":15533,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-05 14:35:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":23632,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-05 14:35:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":16074,"user":"50d273d2-c9d2-425d-a22d-cc7338b6bc3e","date":"2017-12-05 14:35:30","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":41312,"user":"50d273d2-c9d2-425d-a22d-cc7338b6bc3e","date":"2017-12-05 14:35:30","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":16345,"user":"6fb1b046-1d89-4162-8437-722d44e22f50","date":"2017-12-05 14:35:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":4363,"user":"6fb1b046-1d89-4162-8437-722d44e22f50","date":"2017-12-05 14:35:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":13167,"user":"2bb8ff82-061d-43cd-a020-a2cffad09d1e","date":"2017-12-05 14:36:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":7995,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-05 14:36:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":41846,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-05 14:36:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1482,"user":"2bb8ff82-061d-43cd-a020-a2cffad09d1e","date":"2017-12-05 14:37:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22713,"user":"2bb8ff82-061d-43cd-a020-a2cffad09d1e","date":"2017-12-05 14:37:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":15504,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:37:09","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":41509,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:37:09","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":6407,"user":"2b5f9b04-bd61-4108-b289-84a2c1002a82","date":"2017-12-05 14:37:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":11114,"user":"2b5f9b04-bd61-4108-b289-84a2c1002a82","date":"2017-12-05 14:37:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":15942,"user":"e3c31dbf-4c63-4e59-aa78-540cb586910e","date":"2017-12-05 14:37:38","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":5090,"user":"e3c31dbf-4c63-4e59-aa78-540cb586910e","date":"2017-12-05 14:37:38","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3209,"user":"61106f0d-7c7b-4b7a-a3d3-5ba1af9aacf4","date":"2017-12-05 14:37:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if low < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":19331,"user":"a0677365-0929-4e2e-8719-3729105927cd","date":"2017-12-05 14:38:32","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":12361,"user":"a0677365-0929-4e2e-8719-3729105927cd","date":"2017-12-05 14:38:32","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":28060,"user":"09e5a143-ae3a-4611-8cfa-45d52e07b2c6","date":"2017-12-05 14:38:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":21466,"user":"09e5a143-ae3a-4611-8cfa-45d52e07b2c6","date":"2017-12-05 14:38:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":7558,"user":"c8ff27a3-b9c4-40dd-95d5-68feefbafff7","date":"2017-12-05 14:38:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":887,"user":"c8ff27a3-b9c4-40dd-95d5-68feefbafff7","date":"2017-12-05 14:39:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":37458,"user":"995eab58-b496-45c9-aacf-4878531bfc6f","date":"2017-12-05 14:39:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40720,"user":"07a2a74b-d2da-4f91-ba7e-5881b51fd5e4","date":"2017-12-05 14:40:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40790,"user":"07a2a74b-d2da-4f91-ba7e-5881b51fd5e4","date":"2017-12-05 14:40:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":21787,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:40:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9446,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:40:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":1611,"user":"03ce4b42-26f0-456c-9d48-18c0d16bec55","date":"2017-12-05 14:40:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":29789,"user":"00ee78cc-7a00-47a7-85bb-9c524dad656c","date":"2017-12-05 14:40:11","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22507,"user":"00ee78cc-7a00-47a7-85bb-9c524dad656c","date":"2017-12-05 14:40:11","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":2246,"user":"c8ff27a3-b9c4-40dd-95d5-68feefbafff7","date":"2017-12-05 14:40:22","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid\n else:\n high = mid + 1\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":41793,"user":"c8ff27a3-b9c4-40dd-95d5-68feefbafff7","date":"2017-12-05 14:40:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":19906,"user":"c8ff27a3-b9c4-40dd-95d5-68feefbafff7","date":"2017-12-05 14:40:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":11755,"user":"97b1fa02-4c4e-425b-a371-6b1b38862a02","date":"2017-12-05 14:41:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":2219,"user":"97b1fa02-4c4e-425b-a371-6b1b38862a02","date":"2017-12-05 14:41:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":35154,"user":"9ae0539b-3842-4209-9c3e-252c74db087e","date":"2017-12-05 14:41:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40465,"user":"2ff47805-d62a-4ff9-9297-d30f89b68639","date":"2017-12-05 14:41:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n mid = 0\n while low < len(a) and a[low] < q:\n mid = (high + low) \/\/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":true} -{"submission_id":5281,"user":"2ff47805-d62a-4ff9-9297-d30f89b68639","date":"2017-12-05 14:41:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n mid = 0\n while low < len(a) and a[low] < q:\n mid = (high + low) \/\/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":true} -{"submission_id":18313,"user":"995eab58-b496-45c9-aacf-4878531bfc6f","date":"2017-12-05 14:41:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":25172,"user":"995eab58-b496-45c9-aacf-4878531bfc6f","date":"2017-12-05 14:41:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":37761,"user":"9ae0539b-3842-4209-9c3e-252c74db087e","date":"2017-12-05 14:41:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":34501,"user":"9ae0539b-3842-4209-9c3e-252c74db087e","date":"2017-12-05 14:41:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8926,"user":"553c9a10-8e3d-401b-8100-2094287197ed","date":"2017-12-05 14:42:00","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n print(q)\n print(a, len(a))\n print(low, high)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n 0\n else:\n 0\n print(q)\n print(a, len(a))\n print(low, mid, high)\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n low = high\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":35920,"user":"553c9a10-8e3d-401b-8100-2094287197ed","date":"2017-12-05 14:43:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n print(q)\n print(a, len(a))\n print(low, high)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n print(q)\n print(a, len(a))\n print(low, mid, high)\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":31740,"user":"f565987c-8fbf-4b95-b405-cf1a3ccac8f5","date":"2017-12-05 14:44:56","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":7657,"user":"f565987c-8fbf-4b95-b405-cf1a3ccac8f5","date":"2017-12-05 14:44:56","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":6685,"user":"553c9a10-8e3d-401b-8100-2094287197ed","date":"2017-12-05 14:45:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n print(q)\n print(a, len(a))\n print(low, mid, high)\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":14459,"user":"553c9a10-8e3d-401b-8100-2094287197ed","date":"2017-12-05 14:45:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3128,"user":"553c9a10-8e3d-401b-8100-2094287197ed","date":"2017-12-05 14:45:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":39584,"user":"7352a7ab-bc53-49d3-8ca7-32aa046fe82d","date":"2017-12-05 14:45:48","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":19696,"user":"61106f0d-7c7b-4b7a-a3d3-5ba1af9aacf4","date":"2017-12-05 14:46:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":30876,"user":"61106f0d-7c7b-4b7a-a3d3-5ba1af9aacf4","date":"2017-12-05 14:46:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22098,"user":"7352a7ab-bc53-49d3-8ca7-32aa046fe82d","date":"2017-12-05 14:46:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":24696,"user":"7352a7ab-bc53-49d3-8ca7-32aa046fe82d","date":"2017-12-05 14:47:09","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":25216,"user":"7352a7ab-bc53-49d3-8ca7-32aa046fe82d","date":"2017-12-05 14:48:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":26133,"user":"7352a7ab-bc53-49d3-8ca7-32aa046fe82d","date":"2017-12-05 14:48:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":30539,"user":"7352a7ab-bc53-49d3-8ca7-32aa046fe82d","date":"2017-12-05 14:48:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":12485,"user":"91c1f76a-f1ab-4be9-b7ed-6ebaa799aa56","date":"2017-12-05 14:48:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + high \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22392,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 14:49:12","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40400,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 14:49:38","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle\n assert low == 0 or a[low - 1] < q\n else:\n high = middle\n assert high == len(a) or q <= a[high]","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":30633,"user":"7d63d843-7e5d-4c24-a378-1056c311dfd2","date":"2017-12-05 14:50:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return high","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":16756,"user":"7d63d843-7e5d-4c24-a378-1056c311dfd2","date":"2017-12-05 14:50:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return high","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22622,"user":"91c1f76a-f1ab-4be9-b7ed-6ebaa799aa56","date":"2017-12-05 14:50:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":17648,"user":"91c1f76a-f1ab-4be9-b7ed-6ebaa799aa56","date":"2017-12-05 14:50:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":4391,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 14:50:34","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle\n assert low == 0 or a[low - 1] < q\n else:\n high = middle\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":29446,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 14:50:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle\n assert low == 0 or a[low - 1] < q\n else:\n high = middle\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9988,"user":"587649dc-83bf-4c24-bb43-de304405f3b9","date":"2017-12-05 14:51:06","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":849,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 14:51:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle\n assert low == 0 or a[low - 1] < q\n else:\n high = middle\n assert high == len(a) or q <= a[high]\n return low[i]","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18192,"user":"a758f933-ec7a-444d-b3d2-f685ac9d9563","date":"2017-12-05 14:51:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18449,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:52:06","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":17821,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:52:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low, high","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9609,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:53:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return mid","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":9872,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:53:30","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return high - low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":25603,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:53:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return len(a)","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":5734,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 14:54:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = middle\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":29829,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:54:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":38464,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:54:49","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return high","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":35600,"user":"a758f933-ec7a-444d-b3d2-f685ac9d9563","date":"2017-12-05 14:55:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":5054,"user":"a758f933-ec7a-444d-b3d2-f685ac9d9563","date":"2017-12-05 14:55:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22596,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:57:33","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return high - mid","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":37755,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 15:02:33","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = middle\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22475,"user":"1d4a4b3b-be4e-49dc-96cc-fceb60ad22a1","date":"2017-12-05 15:02:36","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q or low == 0\n else:\n high = mid\n assert q <= a[high] or high == len(a)\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":31027,"user":"1d4a4b3b-be4e-49dc-96cc-fceb60ad22a1","date":"2017-12-05 15:02:36","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q or low == 0\n else:\n high = mid\n assert q <= a[high] or high == len(a)\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":8964,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 15:03:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle + 1\n else:\n high = middle\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":28110,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 15:03:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle + 1\n else:\n high = middle\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":33602,"user":"05bc0114-9d34-4210-bb9b-07af403e11ed","date":"2017-12-05 15:03:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n elif a[mid] == q:\n return mid\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":36233,"user":"05bc0114-9d34-4210-bb9b-07af403e11ed","date":"2017-12-05 15:04:47","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n elif a[mid] == q:\n return mid\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":20665,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-05 15:06:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":20563,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-05 15:07:00","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":26777,"user":"05bc0114-9d34-4210-bb9b-07af403e11ed","date":"2017-12-05 15:07:06","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n elif a[mid] == q:\n return mid\n else:\n high = mid\n assert q <= a[high]\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":31409,"user":"05bc0114-9d34-4210-bb9b-07af403e11ed","date":"2017-12-05 15:07:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":12314,"user":"05bc0114-9d34-4210-bb9b-07af403e11ed","date":"2017-12-05 15:07:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":13364,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 15:08:36","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":35170,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 15:08:36","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":20744,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-05 15:11:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":31440,"user":"03ce4b42-26f0-456c-9d48-18c0d16bec55","date":"2017-12-05 15:14:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40065,"user":"03ce4b42-26f0-456c-9d48-18c0d16bec55","date":"2017-12-05 15:14:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":41360,"user":"587649dc-83bf-4c24-bb43-de304405f3b9","date":"2017-12-05 15:17:13","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":6683,"user":"587649dc-83bf-4c24-bb43-de304405f3b9","date":"2017-12-05 15:17:13","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":41391,"user":"50aef720-52de-4735-8874-78f5a311b939","date":"2017-12-05 15:21:49","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":32276,"user":"50aef720-52de-4735-8874-78f5a311b939","date":"2017-12-05 15:21:49","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":7046,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-05 15:22:29","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":31512,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-05 15:22:29","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":37933,"user":"f15a871d-61c5-494f-8886-91e213b59201","date":"2017-12-05 15:48:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3893,"user":"f15a871d-61c5-494f-8886-91e213b59201","date":"2017-12-05 15:48:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":901,"user":"dd2b828e-e813-417d-b910-df48d2f89ccc","date":"2017-12-05 16:36:56","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n search = (high + low) \/ 2\n if a[search] == q:\n return True\n elif a[search] > q:\n high = search\n else:\n low = search\n if low == search:\n low += 1\n return False","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":32045,"user":"dd2b828e-e813-417d-b910-df48d2f89ccc","date":"2017-12-05 16:46:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n search = (high + low) \/ 2\n if a[search] == q:\n return search\n elif a[search] > q:\n high = search\n else:\n low = search\n if low == search:\n low += 1\n return search","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18329,"user":"dd2b828e-e813-417d-b910-df48d2f89ccc","date":"2017-12-05 16:49:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n search = (high + low) \/ 2\n while high != low and a[search] != q:\n search = (high + low) \/ 2\n if a[search] > q:\n high = search\n else:\n low = search\n if low == search:\n low += 1\n return search","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18328,"user":"0964a543-93db-460b-a0c5-d0c94fea250f","date":"2017-12-05 16:52:53","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":26881,"user":"dd2b828e-e813-417d-b910-df48d2f89ccc","date":"2017-12-05 16:53:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n search = (high + low) \/ 2\n if a[search] == q and a[search - 1] != q:\n return search\n elif a[search] > q:\n high = search\n else:\n low = search\n if low == search:\n low += 1\n return search","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":22449,"user":"05bf8435-64be-48cb-be81-139956827989","date":"2017-12-05 17:10:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":10331,"user":"dd2b828e-e813-417d-b910-df48d2f89ccc","date":"2017-12-05 17:18:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n search = (high + low) \/ 2\n assert low <= search < high\n if a[search] < q:\n low = search + 1\n assert a[low - 1] < q\n else:\n high = search\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":10810,"user":"dd2b828e-e813-417d-b910-df48d2f89ccc","date":"2017-12-05 17:18:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n search = (high + low) \/ 2\n assert low <= search < high\n if a[search] < q:\n low = search + 1\n assert a[low - 1] < q\n else:\n high = search\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":6963,"user":"05bf8435-64be-48cb-be81-139956827989","date":"2017-12-05 18:34:51","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":32890,"user":"05bf8435-64be-48cb-be81-139956827989","date":"2017-12-05 18:34:51","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":18419,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-12-05 20:19:13","func_code":"def intersection(a, b):\n seen = {}\n appended = {}\n c = []\n i = 0\n while i < len(a):\n seen[a[i]] = True\n i = i + 1\n i = 0\n while i < len(b):\n if b[i] in seen and b[i] not in appended:\n c.append(b[i])\n appended[b[i]] = True\n i = i + 1\n return c","func_name":"intersection","assignment_id":"sets.py_ca277_intersection","academic_year":2016,"module":"ca277","test":"assert intersection([],[])==[] and intersection([20052, 20052, -9991],[102, 20052, -9991])==[20052, -9991] and intersection([38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794],[38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794])==[38908273694008580353068229963801163341, 59, -38, 28239, -2723, 24559, -5794]","description":"Return the elements which are in both lists.","correct":true} -{"submission_id":19594,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-12-05 20:19:13","func_code":"def intersection(a, b):\n seen = {}\n appended = {}\n c = []\n i = 0\n while i < len(a):\n seen[a[i]] = True\n i = i + 1\n i = 0\n while i < len(b):\n if b[i] in seen and b[i] not in appended:\n c.append(b[i])\n appended[b[i]] = True\n i = i + 1\n return c","func_name":"intersection","assignment_id":"sets.py_ca277_intersection","academic_year":2016,"module":"ca277","test":"assert intersection([],[])==[] and intersection([20052, 20052, -9991],[102, 20052, -9991])==[20052, -9991] and intersection([38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794],[38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794])==[38908273694008580353068229963801163341, 59, -38, 28239, -2723, 24559, -5794]","description":"Return the elements which are in both lists.","correct":true} -{"submission_id":34098,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-12-05 20:19:13","func_code":"def union(a, b):\n a = a + b\n seen = {}\n c = []\n i = 0\n while i < len(a):\n if a[i] not in seen:\n c.append(a[i])\n seen[a[i]] = True\n i = i + 1\n return c","func_name":"union","assignment_id":"sets.py_ca277_union","academic_year":2016,"module":"ca277","test":"assert union([],[])==[] and union([25785],[25785])==[25785] and union([-90, 21135, 29310, -8059, 7114, -90, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996],[5, -9316, 7379237229304681733])==[-90, 21135, 29310, -8059, 7114, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996, 5, -9316, 7379237229304681733]","description":"Merge two lists into a single one.","correct":true} -{"submission_id":4021,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-12-05 20:19:13","func_code":"def union(a, b):\n a = a + b\n seen = {}\n c = []\n i = 0\n while i < len(a):\n if a[i] not in seen:\n c.append(a[i])\n seen[a[i]] = True\n i = i + 1\n return c","func_name":"union","assignment_id":"sets.py_ca277_union","academic_year":2016,"module":"ca277","test":"assert union([],[])==[] and union([25785],[25785])==[25785] and union([-90, 21135, 29310, -8059, 7114, -90, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996],[5, -9316, 7379237229304681733])==[-90, 21135, 29310, -8059, 7114, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996, 5, -9316, 7379237229304681733]","description":"Merge two lists into a single one.","correct":true} -{"submission_id":14097,"user":"334b0f61-5fa3-43cf-8691-29f975dd7270","date":"2017-12-05 20:58:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":39368,"user":"334b0f61-5fa3-43cf-8691-29f975dd7270","date":"2017-12-05 20:58:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3393,"user":"0964a543-93db-460b-a0c5-d0c94fea250f","date":"2017-12-05 21:53:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40653,"user":"0964a543-93db-460b-a0c5-d0c94fea250f","date":"2017-12-05 21:53:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":14829,"user":"0964a543-93db-460b-a0c5-d0c94fea250f","date":"2017-12-05 21:53:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":10375,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-05 22:00:32","func_code":"def walkback(a, q, i):\n while i > 1 and a[i - 1] == q:\n i -= 1\n return i\n\n\ndef bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n guess = low + (high - low) \/ 2\n if a[guess] == q:\n return walkback(a, q, guess)\n elif a[guess] < q:\n low = guess + 1\n else:\n high = guess - 1\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":23915,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-05 22:12:07","func_code":"def walkback(a, q, i):\n while i > 1 and a[i - 1] == q:\n i -= 1\n return i\n\n\ndef bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n guess = low + (high - low) \/\/ 2\n if a[guess] == q:\n return walkback(a, q, guess)\n elif a[guess] < q:\n low = guess + 1\n else:\n high = guess\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":true} -{"submission_id":26553,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-05 22:14:02","func_code":"def walkback(a, q, i):\n while i > 0 and a[i - 1] == q:\n i -= 1\n return i\n\n\ndef bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n guess = low + (high - low) \/\/ 2\n if a[guess] == q:\n return walkback(a, q, guess)\n elif a[guess] < q:\n low = guess + 1\n else:\n high = guess\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":true} -{"submission_id":41336,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-05 22:14:02","func_code":"def walkback(a, q, i):\n while i > 0 and a[i - 1] == q:\n i -= 1\n return i\n\n\ndef bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n guess = low + (high - low) \/\/ 2\n if a[guess] == q:\n return walkback(a, q, guess)\n elif a[guess] < q:\n low = guess + 1\n else:\n high = guess\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":true} -{"submission_id":253,"user":"0d8d49aa-e213-4ab4-bcc1-440a0397585c","date":"2017-12-06 01:05:56","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":6317,"user":"0d8d49aa-e213-4ab4-bcc1-440a0397585c","date":"2017-12-06 01:05:56","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":20434,"user":"f278f0d6-3389-497b-a30b-f0d8ecebb7e1","date":"2017-12-06 11:34:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":35842,"user":"f278f0d6-3389-497b-a30b-f0d8ecebb7e1","date":"2017-12-06 11:36:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3824,"user":"f278f0d6-3389-497b-a30b-f0d8ecebb7e1","date":"2017-12-06 11:36:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":540,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 12:03:03","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":11347,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 12:03:03","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":4193,"user":"86f3bfd9-abca-4a94-ac95-d257d354e3e5","date":"2017-12-06 12:03:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":35750,"user":"86f3bfd9-abca-4a94-ac95-d257d354e3e5","date":"2017-12-06 12:03:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":29289,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-12-06 12:23:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":10588,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-12-06 12:28:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":38791,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-12-06 12:28:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":21960,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-12-06 12:43:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":13031,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-12-06 12:56:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":3861,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-12-06 12:56:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":36210,"user":"fc726678-a7a5-405b-bc49-844b42ef4a2b","date":"2017-12-06 15:18:12","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":24632,"user":"fc726678-a7a5-405b-bc49-844b42ef4a2b","date":"2017-12-06 15:18:12","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":25507,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 16:16:57","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8622,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 16:16:57","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":23208,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 16:17:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return\n\n\ndef reverse(a):\n return swap(a, 2, 3)","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":22809,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 16:19:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return\n\n\ndef reverse(a):\n return swap(a, 2, 3)","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":35358,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 16:19:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return\n\n\ndef reverse(a):\n return swap(a, 2, 3)","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":34060,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 16:19:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return\n\n\ndef reverse(a):\n return swap(a, 2, 3)","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":22204,"user":"35d18426-1565-4cbc-afa0-82ff8cbc8cbd","date":"2017-12-06 16:35:00","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":8809,"user":"35d18426-1565-4cbc-afa0-82ff8cbc8cbd","date":"2017-12-06 16:35:00","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":9095,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-06 17:33:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, a[i], a[len(a) - i - 1])\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":5185,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-06 17:34:17","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, a[i], a[len(a) - i - 1])\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":41125,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-06 17:37:54","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - i - 1\n swap(a, i, j)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":25428,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-06 17:37:54","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - i - 1\n swap(a, i, j)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":true} -{"submission_id":41868,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-06 18:18:08","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n min_ind = i\n while j < len(a):\n if a[j] < a[min_ind]:\n min_ind = j\n j += 1\n tmp = a[i]\n a[i] = a[min_ind]\n a[min_ind] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":8942,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-06 18:18:08","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n min_ind = i\n while j < len(a):\n if a[j] < a[min_ind]:\n min_ind = j\n j += 1\n tmp = a[i]\n a[i] = a[min_ind]\n a[min_ind] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":35216,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-06 18:18:08","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n min_ind = i\n while j < len(a):\n if a[j] < a[min_ind]:\n min_ind = j\n j += 1\n tmp = a[i]\n a[i] = a[min_ind]\n a[min_ind] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":3167,"user":"35d18426-1565-4cbc-afa0-82ff8cbc8cbd","date":"2017-12-06 18:31:41","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":11533,"user":"35d18426-1565-4cbc-afa0-82ff8cbc8cbd","date":"2017-12-06 18:31:41","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10551,"user":"35d18426-1565-4cbc-afa0-82ff8cbc8cbd","date":"2017-12-06 18:31:41","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":836,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:48:33","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n print(len(a) - i)","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":28000,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:48:45","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n print(len(a) - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":24882,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:49:04","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n print(len(a) - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":10894,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:50:29","func_code":"def reverse(a):\n i = 1\n while i < len(a):\n print(len(a) - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":11802,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:53:56","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":32589,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:53:56","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":20110,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 20:00:33","func_code":"def selection_sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":26468,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 20:01:55","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":16723,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 20:01:55","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":22304,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 20:01:55","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":true} -{"submission_id":12105,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-06 20:29:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":37958,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-06 20:29:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":26158,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-06 20:29:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"func_bsearch.py_ca116_bsearch","academic_year":2016,"module":"ca116","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","description":"Search for an element in an array using the binary search algorithm.","correct":false} -{"submission_id":40322,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-07 00:28:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":32210,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-07 00:28:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":6085,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 01:18:48","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":10214,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 01:18:48","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":30825,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:45:03","func_code":"def reverse(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if int(a[j]) > int(a[p]):\n p = j\n j = j + 1\n return p","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":12963,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:46:40","func_code":"def reverse(a):\n p = i\n j = i + 1\n while j < len(a):\n if int(a[j]) > int(a[p]):\n p = j\n j = j + 1\n return p","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":13703,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-07 10:51:50","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":1496,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-07 10:51:50","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":21366,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 10:53:56","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":3411,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 10:53:56","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":5494,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 11:07:11","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":15253,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 11:07:11","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":1859,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 11:34:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":31016,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 11:34:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":3930,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:11:28","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - i - 1\n swap(a, i, j)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":26045,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:11:28","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - i - 1\n swap(a, i, j)\n i = i + 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":39687,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:19:00","func_code":"def selection_sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":170,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:19:55","func_code":"def selection_sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":2231,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:20:31","func_code":"def selection_sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":27033,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:20:46","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":25534,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:21:35","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":5354,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:21:35","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":10282,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:43:16","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n j = p\n j = j + 1\n i = i + 1\n swap(a, i, p)","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":7068,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:48:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n smallest_element(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":29981,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:49:43","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n smallest_element(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":174,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:50:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest_element(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":41676,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:51:48","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest_element(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":32771,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:52:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest_element(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":39126,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:53:07","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n j = p\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest_element(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":6352,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:53:26","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest_element(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":35226,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:53:26","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest_element(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":13369,"user":"8fca450a-2117-453b-8f1b-f55a98c9bdb9","date":"2017-12-13 15:13:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, -i - 1)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":39902,"user":"8fca450a-2117-453b-8f1b-f55a98c9bdb9","date":"2017-12-13 15:13:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, -i - 1)\n i += 1","func_name":"reverse","assignment_id":"func_reverse.py_ca116_reverse","academic_year":2016,"module":"ca116","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","description":"Reverse a list of elements.","correct":false} -{"submission_id":38337,"user":"8fca450a-2117-453b-8f1b-f55a98c9bdb9","date":"2017-12-13 15:13:20","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} -{"submission_id":11771,"user":"8fca450a-2117-453b-8f1b-f55a98c9bdb9","date":"2017-12-13 15:13:20","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"func_selection_sort.py_ca116_selection_sort","academic_year":2016,"module":"ca116","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","description":"Repeatedly move minimimum of remaining sublist to front.","correct":false} +{"submission_id":31156,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-02 11:26:19","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6431,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2016-11-02 11:33:11","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2595,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-02 11:46:18","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11013,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-02 11:46:18","func_code":"def circle_circumference(radius):\n circum = 2 * 3.14 * radius\n return circum","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34545,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-02 11:46:18","func_code":"def circle_area(radius):\n cirarea = 3.14 * radius * radius\n return cirarea","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38491,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-02 11:46:18","func_code":"def square_perimeter(side):\n par = side * 4\n return par","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18695,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-02 11:46:18","func_code":"def circle_circumference(radius):\n circum = 2 * 3.14 * radius\n return circum","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28514,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-02 11:46:18","func_code":"def square_perimeter(side):\n par = side * 4\n return par","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33558,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-02 11:46:18","func_code":"def rectangle_perimeter(length, width):\n rectper = (length + width) * 2\n return rectper","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25266,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-02 11:46:18","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33147,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-02 11:46:18","func_code":"def rectangle_perimeter(length, width):\n rectper = (length + width) * 2\n return rectper","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":24843,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-02 11:46:18","func_code":"def circle_area(radius):\n cirarea = 3.14 * radius * radius\n return cirarea","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32435,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2016-11-02 12:00:07","func_code":"def square_perimeter(side):\n perimeter = side * 4\n return perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17374,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2016-11-02 12:00:07","func_code":"def circle_area(radius):\n area = 3.14 * radius ** 2\n return area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5582,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2016-11-02 12:00:07","func_code":"def circle_circumference(radius):\n circumference = 2 * 3.14 * radius\n return circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2891,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2016-11-02 12:00:07","func_code":"def rectangle_perimeter(length, width):\n perimeter = length * 2 + width * 2\n return perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22500,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2016-11-02 12:00:07","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28205,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2016-11-02 14:22:48","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10222,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-07 10:30:46","func_code":"def circle_area(radius):\n cirarea = 3.14 * radius * radius\n return cirarea","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31543,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-07 10:30:46","func_code":"def circle_circumference(radius):\n circum = 2 * 3.14 * radius\n return circum","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32459,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-07 10:30:46","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14054,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-07 10:30:46","func_code":"def circle_area(radius):\n cirarea = 3.14 * radius * radius\n return cirarea","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16300,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-07 10:30:46","func_code":"def square_perimeter(side):\n par = side * 4\n return par","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1974,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-07 10:30:46","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27054,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-07 10:30:46","func_code":"def circle_circumference(radius):\n circum = 2 * 3.14 * radius\n return circum","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34989,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-07 10:30:46","func_code":"def rectangle_perimeter(length, width):\n rectper = (length + width) * 2\n return rectper","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11789,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-07 10:30:46","func_code":"def rectangle_perimeter(length, width):\n rectper = (length + width) * 2\n return rectper","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9362,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-11-07 10:30:46","func_code":"def square_perimeter(side):\n par = side * 4\n return par","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15210,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-11-09 04:04:22","func_code":"def reverse(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[len(a) - i - 1])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":30147,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-11-09 11:26:49","func_code":"def reverse(a):\n i = 0\n b = []\n while i < len(a):\n b.append(a[len(a) - 1 - i])\n i += 1\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":9559,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-11-09 11:28:01","func_code":"def reverse(a):\n i = 0\n b = []\n while i < len(a):\n b.append(a[len(a) - 1 - i])\n i += 1\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":28315,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-11-09 11:44:09","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n print(a[len(a) - i - 1])\n i = i + 1","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":36245,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-11-09 11:44:09","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n print(a[len(a) - i - 1])\n i = i + 1","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":31526,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-11-09 12:08:51","func_code":"def reverse(a):\n b = []\n while len(a) != 0:\n b.append(a.pop())\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":41886,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2016-11-09 15:51:30","func_code":"def reverse(lines):\n import sys\n lines = sys.stdin.readlines()\n return lines","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":8463,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-11-11 14:19:49","func_code":"def reverse(test):\n b = []\n i = 0\n while i < len(test):\n b.append(test[len(test) - 1 - i])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":28470,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-11-11 14:19:49","func_code":"def reverse(test):\n b = []\n i = 0\n while i < len(test):\n b.append(test[len(test) - 1 - i])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":35792,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 17:48:32","func_code":"def square_area(n):\n return n ** 2","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41601,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 17:59:54","func_code":"def circle_area(n):\n return n * n * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16408,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 17:59:54","func_code":"def rectangle_perimeter(n, m):\n return 2 * (n + m)","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29550,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 17:59:54","func_code":"def circle_circumference(n):\n return 2 * 3.14 * n","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":21849,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 17:59:54","func_code":"def circle_circumference(n):\n return 2 * 3.14 * n","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5944,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 17:59:54","func_code":"def square_area(n):\n return n ** 2","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32724,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 17:59:54","func_code":"def rectangle_perimeter(n, m):\n return 2 * (n + m)","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":7259,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 17:59:54","func_code":"def circle_area(n):\n return n * n * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42119,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 17:59:54","func_code":"def square_perimeter(n):\n return 4 * n","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22066,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 17:59:54","func_code":"def square_area(n):\n return n ** 2","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":30832,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 17:59:54","func_code":"def square_perimeter(n):\n return 4 * n","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9321,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-11-13 18:52:10","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n return a[::-1]\n i = i + 1","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":14622,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2016-12-01 13:53:48","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":36721,"user":"4733f087-f7f5-4b28-b898-9a23b2f59251","date":"2016-12-01 14:06:07","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":20237,"user":"4733f087-f7f5-4b28-b898-9a23b2f59251","date":"2016-12-01 14:06:07","func_code":"def area(n):\n return 3.141 * n ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":30688,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2016-12-01 14:08:15","func_code":"def reverse(a):\n i = 0\n tmp = ''\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2015,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":13565,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2016-12-01 14:23:41","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j += 1\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":13352,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2016-12-01 14:23:41","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j += 1\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":23622,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2016-12-01 16:07:37","func_code":"def swapi(a, i, j):\n if a[j] < a[i]:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n j = i\n while j < len(a):\n swapi(a, i, j)\n j += 1\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":3205,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2016-12-01 16:07:37","func_code":"def swapi(a, i, j):\n if a[j] < a[i]:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n j = i\n while j < len(a):\n swapi(a, i, j)\n j += 1\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":28475,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2016-12-01 19:55:26","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":23480,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2016-12-01 20:01:08","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":27759,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2016-12-01 20:01:08","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":16395,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2016-12-03 13:47:36","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10374,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2016-12-03 15:54:29","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":37547,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2016-12-03 15:54:29","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":40460,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2016-12-04 09:44:21","func_code":"def reverse(a):\n return a.reverse()","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2015,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":1689,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2016-12-04 10:03:47","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":10354,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2016-12-04 10:03:47","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":19259,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2016-12-04 17:59:14","func_code":"def double(x):\n return x * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19874,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2016-12-04 18:02:14","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39732,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2016-12-04 18:02:14","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4559,"user":"fac2ee37-8224-43e0-9c23-7cc249889343","date":"2016-12-05 10:17:51","func_code":"def double(x):\n return x * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":24595,"user":"fac2ee37-8224-43e0-9c23-7cc249889343","date":"2016-12-05 10:17:51","func_code":"def double(x):\n return x * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":33085,"user":"fac2ee37-8224-43e0-9c23-7cc249889343","date":"2016-12-05 10:27:15","func_code":"def circumference(x):\n return 2 * pie * x","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":23704,"user":"fac2ee37-8224-43e0-9c23-7cc249889343","date":"2016-12-05 10:27:15","func_code":"def area(x):\n return pie * (x * x)","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13159,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2016-12-05 10:36:35","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":486,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2016-12-05 10:52:45","func_code":"def circle_circumference(r):\n cc = 2 * 3.14 * r\n return cc","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18974,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2016-12-05 10:52:45","func_code":"def rectangle_perimeter(a, b):\n rp = 2 * a + 2 * b\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23752,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2016-12-05 10:52:45","func_code":"def circle_area(r):\n ca = r * r * 3.14\n return ca","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5497,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2016-12-05 10:52:45","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29949,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2016-12-05 10:52:45","func_code":"def square_perimeter(p):\n sq_p = 4 * p\n return sq_p","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":8308,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-12-06 11:33:53","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":27066,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2016-12-06 13:40:40","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":61,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2016-12-06 13:54:36","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":252,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2016-12-06 13:54:36","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":11391,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2016-12-06 13:55:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":38128,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2016-12-06 13:55:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":32728,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2016-12-06 13:55:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8466,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2016-12-06 14:00:41","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2015,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":7118,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2016-12-06 14:00:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":27458,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2016-12-06 14:00:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":11679,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2016-12-06 14:01:22","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":42468,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-12-06 14:02:21","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":6914,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-12-06 14:02:21","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22913,"user":"4733f087-f7f5-4b28-b898-9a23b2f59251","date":"2016-12-06 14:02:26","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":28731,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2016-12-06 14:04:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":27041,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2016-12-06 14:04:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":2928,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2016-12-06 14:05:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":412,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2016-12-06 14:05:30","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":33496,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2016-12-06 14:05:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = low + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":34996,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2016-12-06 14:06:11","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":12077,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2016-12-06 14:06:17","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":17222,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2016-12-06 14:06:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18358,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2016-12-06 14:06:45","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":19042,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2016-12-06 14:09:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":10126,"user":"fac2ee37-8224-43e0-9c23-7cc249889343","date":"2016-12-06 14:09:29","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":31107,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2016-12-06 14:09:48","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":5395,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2016-12-06 14:10:23","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1360,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2016-12-06 14:10:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8781,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2016-12-06 14:11:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":32506,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2016-12-06 14:11:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":29479,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2016-12-06 14:12:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1409,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2016-12-06 14:13:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40542,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2016-12-06 14:13:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9352,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2016-12-06 14:14:30","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = low + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":42323,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2016-12-06 14:14:30","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":24002,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2016-12-06 14:15:05","func_code":"def selection_sort(a):\n i = 0\n while i < len(a) - 1:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":26273,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2016-12-06 14:15:05","func_code":"def selection_sort(a):\n i = 0\n while i < len(a) - 1:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":8057,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2016-12-06 14:16:12","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":4974,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2016-12-06 14:16:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":42009,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2016-12-06 14:17:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":33026,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2016-12-06 14:17:45","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":12519,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2016-12-06 14:18:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":39569,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2016-12-06 14:19:47","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":20233,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2016-12-06 14:19:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3600,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2016-12-06 14:21:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n mid = len(a) \/ 2\n while low < high:\n if q > a[mid]:\n low = mid + 1\n else:\n high = mid\n mid = (low + high) \/ 2\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13532,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2016-12-06 14:21:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1622,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2016-12-06 14:23:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":28794,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2016-12-06 14:24:19","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":2127,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2016-12-06 14:24:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13601,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2016-12-06 14:24:47","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":33295,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2016-12-06 14:25:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":23314,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2016-12-06 14:25:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":20667,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2016-12-06 14:25:16","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9715,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2016-12-06 14:27:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":24887,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2016-12-06 14:28:00","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9783,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2016-12-06 14:31:11","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":14283,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-12-06 14:32:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":16407,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2016-12-06 14:32:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":12196,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2016-12-06 14:33:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8678,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2016-12-06 14:33:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":30761,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2016-12-06 14:33:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/\/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":true} +{"submission_id":24312,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2016-12-06 14:38:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n i = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1856,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2016-12-06 14:38:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":5914,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2016-12-06 14:41:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":37931,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2016-12-06 14:44:34","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":7897,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2016-12-06 14:44:34","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":35122,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2016-12-06 14:46:03","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":10111,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2016-12-06 14:46:20","func_code":"def bsearch(a, q):\n start = 0\n end = len(a)\n while end > start:\n m = (start + end) \/ 2\n if a[m] < q:\n start = m + 1\n else:\n end = m\n return start","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":982,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2016-12-06 14:46:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":6975,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2016-12-06 14:46:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9414,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2016-12-06 14:48:23","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":29659,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2016-12-06 14:50:19","func_code":"def square_perimeter(s):\n return s * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1880,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2016-12-06 14:50:19","func_code":"def circle_area(r):\n area = r * r * 3.14\n return area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":8950,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2016-12-06 14:50:19","func_code":"def rectangle_perimeter(x1, y1, x2, y2):\n perimeter = x1 + y1 + x2 + y2\n return perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22116,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2016-12-06 14:50:19","func_code":"def circle_circumference(r):\n circumference = 2 * 3.14 * r\n return circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23555,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2016-12-06 14:50:19","func_code":"def circle_area(r):\n area = r * r * 3.14\n return area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32347,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2016-12-06 14:50:19","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11452,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2016-12-06 14:50:19","func_code":"def square_perimeter(s):\n return s * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38295,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2016-12-06 14:50:19","func_code":"def circle_circumference(r):\n circumference = 2 * 3.14 * r\n return circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":24487,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2016-12-06 14:50:19","func_code":"def rectangle_perimeter(x1, y1, x2, y2):\n perimeter = x1 + y1 + x2 + y2\n return perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1284,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2016-12-06 14:56:21","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8502,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-12-06 15:01:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":35126,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-12-06 15:01:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":20112,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2016-12-06 15:05:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":33834,"user":"109505d5-be18-4a61-8318-5d522de4300e","date":"2016-12-06 15:07:51","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":27213,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2016-12-06 15:08:33","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":24170,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-12-06 15:16:59","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":34114,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-12-06 15:28:13","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":21434,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-12-06 15:28:13","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41987,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2016-12-06 15:58:11","func_code":"def bsearch(a, q):\n start = 0\n end = len(a)\n while start < end:\n middle = (start + end) \/ 2\n if a[middle] < q:\n start = middle + 1\n else:\n end = middle\n return start","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":32545,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2016-12-06 16:13:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18354,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2016-12-06 16:13:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":30828,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-12-06 16:42:30","func_code":"def reverse(a):\n import sys\n a = sys.stdin.readlines()\n i = 0\n b = []\n while i < len(a):\n f = a[len(a) - i - 1]\n i = i + 1\n b.append(f.rstrip())\n print(b)\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":18264,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2016-12-06 16:42:30","func_code":"def reverse(a):\n import sys\n a = sys.stdin.readlines()\n i = 0\n b = []\n while i < len(a):\n f = a[len(a) - i - 1]\n i = i + 1\n b.append(f.rstrip())\n print(b)\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":14067,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-12-06 16:42:36","func_code":"def square_area(side):\n x = side * side\n return x","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":21368,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-12-06 16:52:18","func_code":"def circle_circumference(radius):\n x = 2 * 3.14 * radius\n return x","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23527,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-12-06 16:52:18","func_code":"def square_area(side):\n x = side * side\n return x","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37488,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-12-06 16:52:18","func_code":"def rectangle_perimeter(l, b):\n x = l * 2 + b * 2\n return x","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41356,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-12-06 16:52:18","func_code":"def square_perimeter(side):\n x = side + side + side + side\n return x","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27217,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-12-06 16:52:18","func_code":"def circle_area(radius):\n x = 3.14 * (radius * radius)\n return x","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25992,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2016-12-06 17:59:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13890,"user":"0fe97cdd-5534-49d7-8452-aaf0faff48ad","date":"2016-12-06 18:07:36","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38601,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2016-12-06 18:30:21","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":2959,"user":"0fe97cdd-5534-49d7-8452-aaf0faff48ad","date":"2016-12-06 18:39:49","func_code":"def circle_circumference(r):\n return 2 * pi * r","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37405,"user":"0fe97cdd-5534-49d7-8452-aaf0faff48ad","date":"2016-12-06 18:39:49","func_code":"def rectangle_perimeter(l, h):\n return 2 * h + 2 * l","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41201,"user":"0fe97cdd-5534-49d7-8452-aaf0faff48ad","date":"2016-12-06 18:39:49","func_code":"def circle_area(r):\n return pi * r * r","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33580,"user":"0fe97cdd-5534-49d7-8452-aaf0faff48ad","date":"2016-12-06 18:39:49","func_code":"def circle_area(r):\n return pi * r * r","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40080,"user":"0fe97cdd-5534-49d7-8452-aaf0faff48ad","date":"2016-12-06 18:39:49","func_code":"def square_perimeter(side):\n return side * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":945,"user":"0fe97cdd-5534-49d7-8452-aaf0faff48ad","date":"2016-12-06 18:39:49","func_code":"def rectangle_perimeter(l, h):\n return 2 * h + 2 * l","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":3073,"user":"0fe97cdd-5534-49d7-8452-aaf0faff48ad","date":"2016-12-06 18:39:49","func_code":"def square_perimeter(side):\n return side * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":24015,"user":"0fe97cdd-5534-49d7-8452-aaf0faff48ad","date":"2016-12-06 18:39:49","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2082,"user":"0fe97cdd-5534-49d7-8452-aaf0faff48ad","date":"2016-12-06 18:39:49","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5280,"user":"0fe97cdd-5534-49d7-8452-aaf0faff48ad","date":"2016-12-06 18:39:49","func_code":"def circle_circumference(r):\n return 2 * pi * r","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2071,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-12-06 18:46:08","func_code":"def reverse(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[len(a) - 1 - i])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":30736,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2016-12-06 18:46:49","func_code":"def area(r):\n y = pi * r * r\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37726,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2016-12-06 18:46:49","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":22110,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2016-12-06 18:47:24","func_code":"def reverse(a):\n i = len(a) - 1\n b = []\n while i >= 0:\n b.append(a[i])\n i -= 1\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2015,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":31388,"user":"dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa","date":"2016-12-06 19:22:13","func_code":"def square_area(side):\n area = side * side\n return area","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32327,"user":"dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa","date":"2016-12-06 19:26:58","func_code":"def square_area(side):\n area = side * side\n return area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":26759,"user":"dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa","date":"2016-12-06 19:26:58","func_code":"def square_area(side):\n area = side * side\n return area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1408,"user":"dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa","date":"2016-12-06 19:26:58","func_code":"def circle_area(r):\n circ = r * r * 3.14\n return circ","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":90,"user":"dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa","date":"2016-12-06 19:26:58","func_code":"def circle_circumference(x):\n circum = 2 * (x * 3.14)\n return circum","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35198,"user":"dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa","date":"2016-12-06 19:26:58","func_code":"def rectangle_perimeter(l, w):\n peri = l + w + l + w\n return peri","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":21853,"user":"dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa","date":"2016-12-06 19:26:58","func_code":"def rectangle_perimeter(l, w):\n peri = l + w + l + w\n return peri","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":589,"user":"dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa","date":"2016-12-06 19:26:58","func_code":"def square_perimeter(a):\n total = a + a + a + a\n return total","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28861,"user":"dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa","date":"2016-12-06 19:26:58","func_code":"def circle_circumference(x):\n circum = 2 * (x * 3.14)\n return circum","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10402,"user":"dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa","date":"2016-12-06 19:26:58","func_code":"def square_perimeter(a):\n total = a + a + a + a\n return total","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23342,"user":"dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa","date":"2016-12-06 19:26:58","func_code":"def circle_area(r):\n circ = r * r * 3.14\n return circ","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33159,"user":"b69e2427-8f89-4880-8245-6f14d4d2354a","date":"2016-12-06 21:43:47","func_code":"def rectangle_perimeter(side1, side2):\n return side1 * 2 + side2 * 2","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":24447,"user":"b69e2427-8f89-4880-8245-6f14d4d2354a","date":"2016-12-06 21:43:47","func_code":"def square_perimeter(b):\n return b * 4\n\n\ndef square_area(a):\n return a * a\n\n def square_perimeter(b):\n return b * 4","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20441,"user":"b69e2427-8f89-4880-8245-6f14d4d2354a","date":"2016-12-06 21:43:47","func_code":"def circle_circumference(radius):\n return 2 * 3.14 * radius","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":19662,"user":"b69e2427-8f89-4880-8245-6f14d4d2354a","date":"2016-12-06 21:43:47","func_code":"def square_perimeter(b):\n return b * 4\n\n\ndef square_area(a):\n return a * a\n\n def square_perimeter(b):\n return b * 4","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32200,"user":"b69e2427-8f89-4880-8245-6f14d4d2354a","date":"2016-12-06 21:43:47","func_code":"def square_perimeter(b):\n return b * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16377,"user":"b69e2427-8f89-4880-8245-6f14d4d2354a","date":"2016-12-06 21:43:47","func_code":"def circle_circumference(radius):\n return 2 * 3.14 * radius","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12967,"user":"b69e2427-8f89-4880-8245-6f14d4d2354a","date":"2016-12-06 21:43:47","func_code":"def rectangle_perimeter(side1, side2):\n return side1 * 2 + side2 * 2","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32689,"user":"b69e2427-8f89-4880-8245-6f14d4d2354a","date":"2016-12-06 21:43:47","func_code":"def circle_area(radius1):\n return 3.14 * radius1 * radius1","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":19004,"user":"b69e2427-8f89-4880-8245-6f14d4d2354a","date":"2016-12-06 21:43:47","func_code":"def square_perimeter(b):\n return b * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5114,"user":"b69e2427-8f89-4880-8245-6f14d4d2354a","date":"2016-12-06 21:43:47","func_code":"def circle_area(radius1):\n return 3.14 * radius1 * radius1","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2015,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41040,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2016-12-07 10:57:34","func_code":"def double(x):\n return x * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":20586,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2016-12-07 11:31:32","func_code":"def circumference(x):\n return 2 * 3.141 * x","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":31542,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2016-12-07 11:31:32","func_code":"def area(x):\n return 3.141 * x ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":8336,"user":"8fca450a-2117-453b-8f1b-f55a98c9bdb9","date":"2016-12-07 12:17:08","func_code":"def double(x):\n return x * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":23196,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-12-07 18:15:49","func_code":"def swap(a, i, p):\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n\n\ndef findsmall(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = findsmall(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":35586,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-12-07 18:15:49","func_code":"def swap(a, i, p):\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n\n\ndef findsmall(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = findsmall(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":38902,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2016-12-07 21:50:49","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39152,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2016-12-07 22:06:13","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39486,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2016-12-07 22:06:13","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":14815,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2016-12-07 23:02:16","func_code":"def reverse(a):\n n = len(a)\n i = 0\n while i < n \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2015,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":18400,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2016-12-07 23:44:51","func_code":"def selection_sort(a):\n i = 0\n n = len(a)\n while i < n:\n p = i\n j = i + 1\n while j < n:\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":24685,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2016-12-07 23:44:51","func_code":"def selection_sort(a):\n i = 0\n n = len(a)\n while i < n:\n p = i\n j = i + 1\n while j < n:\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":501,"user":"d2e09b87-6673-4e12-97a7-4a861a6daa84","date":"2016-12-08 11:17:04","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15245,"user":"d2e09b87-6673-4e12-97a7-4a861a6daa84","date":"2016-12-08 11:17:04","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26897,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2016-12-08 11:28:28","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":16534,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2016-12-08 11:38:49","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2015,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":8355,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2016-12-08 11:46:07","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":17769,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2016-12-08 11:46:07","func_code":"def area(r):\n y = pi * r * r\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41475,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-12-08 13:15:44","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26285,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-12-08 13:15:44","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13522,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-12-08 13:20:57","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":42089,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-12-08 13:20:57","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2015,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":35292,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2016-12-08 13:26:29","func_code":"def selection_sort(a):\n i = 0\n j = 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n if i != 0:\n i -= 1\n j -= 1\n else:\n i += 1\n j += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":40998,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2016-12-08 13:26:29","func_code":"def selection_sort(a):\n i = 0\n j = 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n if i != 0:\n i -= 1\n j -= 1\n else:\n i += 1\n j += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2015,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":17911,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-12-10 18:24:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40609,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-12-10 18:24:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":38706,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-12-11 02:57:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":39203,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-12-12 16:38:09","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2015,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":16271,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-10-24 06:31:28","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37341,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-10-24 09:59:31","func_code":"def square_area(x):\n return x * x","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9741,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2016-10-24 10:34:39","func_code":"def square_area(n):\n area = n * n\n return area","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35461,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-10-24 10:34:50","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2016-10-24 10:35:40","func_code":"def square_area(n):\n side = n * n\n return side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17628,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2016-10-24 10:37:09","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38501,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2016-10-24 10:37:34","func_code":"def square_area(a):\n return a * a","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2738,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2016-10-24 10:37:58","func_code":"def square_area(n):\n ans = n * n\n return ans","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34896,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2016-10-24 10:38:47","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":3807,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2016-10-24 10:38:53","func_code":"def square_area(n):\n n = n * n\n return n","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29840,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-10-24 10:44:31","func_code":"def square_area(l):\n return l * l","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35977,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2016-10-24 10:45:49","func_code":"def square_area(x):\n area = x * x\n return area","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18520,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2016-10-24 10:45:49","func_code":"def square_area(x):\n area = x * x\n return area","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":24222,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2016-10-24 10:48:17","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18801,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2016-10-24 10:48:57","func_code":"def square_area(n):\n side = n * n\n return side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15542,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2016-10-24 10:49:33","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22517,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2016-10-24 10:49:34","func_code":"def square_area(l):\n return l * l","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33721,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2016-10-24 10:50:13","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18691,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2016-10-24 10:52:05","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11098,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-24 10:54:28","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14239,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2016-10-24 11:00:21","func_code":"def square_area(x1, y1, x2, y2):\n dx = x1 - x2\n dy = y1 - y2\n area = dx * dy\n if 0 <= area:\n return area\n else:\n return -area","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":24853,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-10-24 12:08:06","func_code":"def rectangle_perimeter(a, b):\n return 2 * a + 2 * b\n\n\ndef square_perimeter(n):\n return rectangle_perimeter(n, n)","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":30647,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-10-24 12:08:06","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38304,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-10-24 12:08:06","func_code":"def circle_area(r):\n return pi * r * r","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":26295,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-10-24 12:08:06","func_code":"def rectangle_perimeter(a, b):\n return 2 * a + 2 * b","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34740,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-10-24 12:08:06","func_code":"def rectangle_perimeter(a, b):\n return 2 * a + 2 * b\n\n\ndef square_perimeter(n):\n return rectangle_perimeter(n, n)","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5785,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-10-24 12:08:06","func_code":"def rectangle_perimeter(a, b):\n return 2 * a + 2 * b","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9765,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-10-24 12:08:06","func_code":"def circle_circumference(r):\n return 2 * pi * r","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16269,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-10-24 12:08:06","func_code":"def circle_circumference(r):\n return 2 * pi * r","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23880,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-10-24 12:08:06","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12273,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-10-24 12:08:06","func_code":"def circle_area(r):\n return pi * r * r","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23009,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2016-10-24 13:38:48","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2226,"user":"52d6165d-a6ff-4d05-9d24-6b0105a2b16c","date":"2016-10-24 14:07:42","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41036,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-10-24 14:09:31","func_code":"def circle_circumference(x):\n return 2 * 3.14 * x","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4087,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-10-24 14:09:31","func_code":"def circle_area(x):\n return 3.14 * (x * x)","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":7462,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-10-24 14:09:31","func_code":"def square_area(x):\n return x * x","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12343,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-10-24 14:09:31","func_code":"def square_perimeter(x):\n return x * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31760,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-10-24 14:09:31","func_code":"def circle_area(x):\n return 3.14 * (x * x)","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38348,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-10-24 14:09:31","func_code":"def square_area(x):\n return x * x","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39783,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-10-24 14:09:31","func_code":"def square_perimeter(x):\n return x * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35567,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-10-24 14:09:31","func_code":"def rectangle_perimeter(x, y):\n return x + x + y + y","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16346,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-10-24 14:09:31","func_code":"def rectangle_perimeter(x, y):\n return x + x + y + y","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28561,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2016-10-24 14:09:31","func_code":"def circle_circumference(x):\n return 2 * 3.14 * x","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28871,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2016-10-24 14:10:43","func_code":"def square_area(n):\n side = n * n\n return side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":79,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2016-10-24 14:10:43","func_code":"def circle_circumference(m):\n circumference = 2 * 3.14 * m\n return circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5671,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2016-10-24 14:10:43","func_code":"def rectangle_perimeter(l, h):\n perimeter = l + l + h + h\n return perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20274,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2016-10-24 14:10:43","func_code":"def square_perimeter(j):\n perimeter = j + j + j + j\n return perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1700,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2016-10-24 14:10:43","func_code":"def circle_area(k):\n area = 3.14 * (k * k)\n return area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39402,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2016-10-24 14:13:22","func_code":"def circle_circumference(m):\n circumference = 2 * 3.14 * m\n return circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17309,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2016-10-24 14:13:22","func_code":"def square_area(n):\n side = n * n\n return side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28620,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2016-10-24 14:13:22","func_code":"def square_perimeter(j):\n per = j * 4\n return per","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39032,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2016-10-24 14:13:22","func_code":"def rectangle_perimeter(a, b):\n rper = 2 * a + 2 * b\n return rper","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28176,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2016-10-24 14:13:22","func_code":"def square_perimeter(j):\n per = j * 4\n return per","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13314,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2016-10-24 14:13:22","func_code":"def circle_area(i):\n area = 3.14 * (i * i)\n return area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22227,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2016-10-24 14:13:22","func_code":"def circle_circumference(m):\n circumference = 2 * 3.14 * m\n return circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4214,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2016-10-24 14:13:22","func_code":"def circle_area(i):\n area = 3.14 * (i * i)\n return area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11474,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2016-10-24 14:13:22","func_code":"def rectangle_perimeter(a, b):\n rper = 2 * a + 2 * b\n return rper","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":74,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2016-10-24 14:13:22","func_code":"def square_area(n):\n side = n * n\n return side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42127,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-10-24 14:13:27","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17590,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2016-10-24 14:13:37","func_code":"def rectangle_perimeter(m, n):\n perimeter = m + m + n + n\n return perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16616,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2016-10-24 14:13:37","func_code":"def square_area(n):\n side = n * n\n return side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28519,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2016-10-24 14:13:37","func_code":"def circle_circumference(n):\n circumference = 2 * 3.14 * n\n return circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42125,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2016-10-24 14:13:37","func_code":"def circle_circumference(n):\n circumference = 2 * 3.14 * n\n return circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2062,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2016-10-24 14:13:37","func_code":"def rectangle_perimeter(m, n):\n perimeter = m + m + n + n\n return perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40797,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2016-10-24 14:13:37","func_code":"def circle_area(n):\n area = 3.14 * (n * n)\n return area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":7003,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2016-10-24 14:13:37","func_code":"def square_perimeter(n):\n perimeter = n + n + n + n\n return perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":36670,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2016-10-24 14:13:37","func_code":"def square_area(n):\n side = n * n\n return side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35778,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2016-10-24 14:13:37","func_code":"def square_perimeter(n):\n perimeter = n + n + n + n\n return perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18214,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2016-10-24 14:13:37","func_code":"def circle_area(n):\n area = 3.14 * (n * n)\n return area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39176,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2016-10-24 14:14:37","func_code":"def rectangle_perimeter(n, m):\n ans = n + n + m + m\n return ans","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29093,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2016-10-24 14:14:37","func_code":"def circle_area(n):\n ans = n * n * 3.14\n return ans","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28228,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2016-10-24 14:14:37","func_code":"def circle_area(n):\n ans = n * n * 3.14\n return ans","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25854,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2016-10-24 14:14:37","func_code":"def square_perimeter(n):\n ans = n + n + n + n\n return ans","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18673,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2016-10-24 14:14:37","func_code":"def square_area(n):\n ans = n * n\n return ans","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":30535,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2016-10-24 14:14:37","func_code":"def circle_circumference(n):\n ans = 2 * 3.14 * n\n return ans","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37747,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2016-10-24 14:14:37","func_code":"def rectangle_perimeter(n, m):\n ans = n + n + m + m\n return ans","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22755,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2016-10-24 14:14:37","func_code":"def circle_circumference(n):\n ans = 2 * 3.14 * n\n return ans","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14778,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2016-10-24 14:14:37","func_code":"def square_perimeter(n):\n ans = n + n + n + n\n return ans","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22757,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2016-10-24 14:14:37","func_code":"def square_area(n):\n ans = n * n\n return ans","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":21819,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2016-10-24 14:15:30","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12323,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2016-10-24 14:15:30","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":26213,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2016-10-24 14:15:39","func_code":"def circle_circumference(n):\n return n * 2 * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25067,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2016-10-24 14:15:39","func_code":"def circle_circumference(n):\n return n * 2 * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":8780,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2016-10-24 14:15:39","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15209,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2016-10-24 14:15:39","func_code":"def circle_area(n):\n return n * n * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28445,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2016-10-24 14:15:39","func_code":"def rectangle_perimeter(a, b):\n return a + a + b + b","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31185,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2016-10-24 14:15:39","func_code":"def rectangle_perimeter(a, b):\n return a + a + b + b","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16244,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2016-10-24 14:15:39","func_code":"def square_perimeter(n):\n return n * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":7889,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2016-10-24 14:15:39","func_code":"def circle_area(n):\n return n * n * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40742,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2016-10-24 14:15:39","func_code":"def square_perimeter(n):\n return n * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31670,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2016-10-24 14:15:39","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25862,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2016-10-24 14:15:52","func_code":"def circle_area(l):\n return 3.14 * (l * l)","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9443,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2016-10-24 14:15:52","func_code":"def circle_circumference(t):\n return 2 * 3.14 * t","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11620,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2016-10-24 14:15:52","func_code":"def rectangle_perimeter(s, v):\n return 2 * v + 2 * s","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5278,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2016-10-24 14:15:52","func_code":"def circle_area(l):\n return 3.14 * (l * l)","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27150,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2016-10-24 14:15:52","func_code":"def circle_circumference(t):\n return 2 * 3.14 * t","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2188,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2016-10-24 14:15:52","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27049,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2016-10-24 14:15:52","func_code":"def rectangle_perimeter(s, v):\n return 2 * v + 2 * s","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40027,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2016-10-24 14:15:52","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10553,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2016-10-24 14:15:52","func_code":"def square_perimeter(m):\n return m * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":24133,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2016-10-24 14:15:52","func_code":"def square_perimeter(m):\n return m * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23899,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2016-10-24 14:16:34","func_code":"def circle_circumference(b):\n cir = 2 * 3.14 * b\n return cir","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11499,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2016-10-24 14:16:34","func_code":"def square_area(n):\n area = n * n\n return area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29607,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2016-10-24 14:16:34","func_code":"def circle_area(r):\n circlearea = r * r\n carea = 3.14 * circlearea\n return carea","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35960,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2016-10-24 14:16:34","func_code":"def square_perimeter(a):\n per = a * 4\n return per","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33974,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2016-10-24 14:16:34","func_code":"def circle_area(r):\n circlearea = r * r\n carea = 3.14 * circlearea\n return carea","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38093,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2016-10-24 14:16:34","func_code":"def circle_circumference(b):\n cir = 2 * 3.14 * b\n return cir","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10931,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2016-10-24 14:16:34","func_code":"def rectangle_perimeter(x, y):\n side1 = x * 2\n side2 = y * 2\n rper = side1 + side2\n return rper","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":958,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2016-10-24 14:16:34","func_code":"def square_perimeter(a):\n per = a * 4\n return per","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41638,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2016-10-24 14:16:34","func_code":"def square_area(n):\n area = n * n\n return area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27624,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2016-10-24 14:16:34","func_code":"def rectangle_perimeter(x, y):\n side1 = x * 2\n side2 = y * 2\n rper = side1 + side2\n return rper","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27363,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-10-24 14:16:58","func_code":"def circle_area(r):\n return 3.14 * (r * r)","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4434,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-10-24 14:16:58","func_code":"def square_perimeter(l):\n return l + l + l + l","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":3288,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-10-24 14:16:58","func_code":"def rectangle_perimeter(l, w):\n return 2 * (l + w)","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":19418,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-10-24 14:16:58","func_code":"def square_perimeter(l):\n return l + l + l + l","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4973,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-10-24 14:16:58","func_code":"def circle_circumference(r):\n return 2 * 3.14 * r","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":3426,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-10-24 14:16:58","func_code":"def rectangle_perimeter(l, w):\n return 2 * (l + w)","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18637,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-10-24 14:16:58","func_code":"def circle_circumference(r):\n return 2 * 3.14 * r","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11698,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-10-24 14:16:58","func_code":"def square_area(l):\n return l * l","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18261,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-10-24 14:16:58","func_code":"def circle_area(r):\n return 3.14 * (r * r)","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35641,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2016-10-24 14:16:58","func_code":"def square_area(l):\n return l * l","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4272,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2016-10-24 14:17:07","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20275,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-10-24 14:18:51","func_code":"def square_perimeter(side):\n return 4 * side","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23457,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-10-24 14:18:51","func_code":"def circle_area(side):\n return side * side * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39143,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-10-24 14:18:51","func_code":"def square_perimeter(side):\n return 4 * side","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22556,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-10-24 14:18:51","func_code":"def circle_circumference(side):\n return 2 * side * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35948,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-10-24 14:18:51","func_code":"def circle_circumference(side):\n return 2 * side * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22672,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-10-24 14:18:51","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37274,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-10-24 14:18:51","func_code":"def rectangle_perimeter(side, side2):\n return 2 * side + 2 * side2","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4761,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-10-24 14:18:51","func_code":"def rectangle_perimeter(side, side2):\n return 2 * side + 2 * side2","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2047,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-10-24 14:18:51","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":36752,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2016-10-24 14:18:51","func_code":"def circle_area(side):\n return side * side * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2360,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2016-10-24 14:20:12","func_code":"def circle_circumference(a):\n return 2 * 3.14 * a","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9590,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2016-10-24 14:20:12","func_code":"def circle_area(a):\n return a * a * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1424,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2016-10-24 14:20:12","func_code":"def rectangle_perimeter(a, b):\n return a + a + b + b","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11808,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2016-10-24 14:20:12","func_code":"def square_area(a):\n return a * a","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35865,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2016-10-24 14:20:12","func_code":"def square_perimeter(a):\n return a + a + a + a","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35453,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-10-24 14:20:33","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11509,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-10-24 14:20:33","func_code":"def square_perimeter(n):\n return n + n + n + n","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":21848,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-10-24 14:20:33","func_code":"def square_perimeter(n):\n return n + n + n + n","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35681,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-10-24 14:20:33","func_code":"def circle_circumference(n):\n return n * 2 * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12272,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-10-24 14:20:33","func_code":"def circle_circumference(n):\n return n * 2 * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5502,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-10-24 14:20:33","func_code":"def circle_area(n):\n return n * n * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20471,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-10-24 14:20:33","func_code":"def circle_area(n):\n return n * n * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2541,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-10-24 14:20:33","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15108,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-10-24 14:20:33","func_code":"def rectangle_perimeter(a, b):\n return a + a + b + b","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":19383,"user":"72504244-3803-4754-91e3-5c7732106556","date":"2016-10-24 14:20:33","func_code":"def rectangle_perimeter(a, b):\n return a + a + b + b","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":26385,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2016-10-24 14:25:57","func_code":"def circle_area(r):\n return r * r * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1440,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2016-10-24 14:25:57","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":8769,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2016-10-24 14:25:57","func_code":"def rectangle_perimeter(a, b):\n return a + a + b + b","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1448,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2016-10-24 14:25:57","func_code":"def circle_circumference(r):\n return 2 * 3.14 * r","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2800,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2016-10-24 14:25:57","func_code":"def square_perimeter(side):\n return side + side + side + side","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":8556,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2016-10-24 14:26:04","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17610,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2016-10-24 14:26:04","func_code":"def circle_circumference(n):\n return 2 * 3.14 * n","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2985,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2016-10-24 14:26:04","func_code":"def square_perimeter(n):\n return n * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4014,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2016-10-24 14:26:04","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":21033,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2016-10-24 14:26:04","func_code":"def rectangle_perimeter(n, side2):\n return 2 * n + 2 * side2","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22446,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2016-10-24 14:26:04","func_code":"def rectangle_perimeter(n, side2):\n return 2 * n + 2 * side2","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20988,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2016-10-24 14:26:04","func_code":"def circle_area(n):\n return n * n * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5862,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2016-10-24 14:26:04","func_code":"def circle_area(n):\n return n * n * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9023,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2016-10-24 14:26:04","func_code":"def square_perimeter(n):\n return n * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16736,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2016-10-24 14:26:04","func_code":"def circle_circumference(n):\n return 2 * 3.14 * n","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40444,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2016-10-24 14:29:37","func_code":"def rectangle_perimeter(n, m):\n return n + n + m + m","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31792,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2016-10-24 14:29:37","func_code":"def circle_circumference(n):\n return 2 * 3.14 * n","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6262,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2016-10-24 14:29:37","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16531,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2016-10-24 14:29:37","func_code":"def circle_area(n):\n return n * n * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":26968,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2016-10-24 14:29:37","func_code":"def square_perimeter(n):\n return n + n + n + n","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28141,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2016-10-24 14:29:37","func_code":"def rectangle_perimeter(n, m):\n return n + n + m + m","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":36776,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2016-10-24 14:29:37","func_code":"def circle_circumference(n):\n return 2 * 3.14 * n","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11584,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2016-10-24 14:29:37","func_code":"def square_area(n):\n return n * n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11957,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2016-10-24 14:29:37","func_code":"def square_perimeter(n):\n return n + n + n + n","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34826,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2016-10-24 14:29:37","func_code":"def circle_area(n):\n return n * n * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":19879,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2016-10-24 14:34:17","func_code":"def rectangle_perimeter(d, e):\n d = d + d\n e = e + e\n return d + e","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33696,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2016-10-24 14:34:17","func_code":"def circle_area(b):\n b = b * b * 3.14\n return b","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":26744,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2016-10-24 14:34:17","func_code":"def circle_circumference(c):\n c = 2 * 3.14 * c\n return c","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42060,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2016-10-24 14:34:17","func_code":"def circle_area(b):\n b = b * b * 3.14\n return b","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2368,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2016-10-24 14:34:17","func_code":"def square_area(n):\n n = n * n\n return n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37570,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2016-10-24 14:34:17","func_code":"def circle_circumference(c):\n c = 2 * 3.14 * c\n return c","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39849,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2016-10-24 14:34:17","func_code":"def square_perimeter(a):\n a = a * 4\n return a","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14689,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2016-10-24 14:34:17","func_code":"def square_perimeter(a):\n a = a * 4\n return a","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13858,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2016-10-24 14:34:17","func_code":"def square_area(n):\n n = n * n\n return n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32516,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2016-10-24 14:34:17","func_code":"def rectangle_perimeter(d, e):\n d = d + d\n e = e + e\n return d + e","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9801,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2016-10-24 14:39:59","func_code":"def square_area(n):\n n = n * n\n return n","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14022,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-24 14:42:00","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16807,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-24 14:42:00","func_code":"def square_perimeter(side):\n return 4 * side","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31586,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-24 14:42:00","func_code":"def circle_area(r):\n return r * r * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13312,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-24 14:42:00","func_code":"def circle_circumference(r):\n return r * 2 * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33731,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-24 14:42:00","func_code":"def rectangle_perimeter(l, w):\n return 2 * (l + w)","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34834,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-24 14:42:00","func_code":"def square_perimeter(side):\n return 4 * side","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40602,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-24 14:42:00","func_code":"def circle_circumference(r):\n return r * 2 * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16952,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-24 14:42:00","func_code":"def circle_area(r):\n return r * r * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12645,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-24 14:42:00","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34463,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-24 14:42:00","func_code":"def rectangle_perimeter(l, w):\n return 2 * (l + w)","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16159,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2016-10-24 14:44:08","func_code":"def square_area(n):\n n = n * n\n return n","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35467,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2016-10-24 14:47:17","func_code":"def square_area(m):\n return m * m","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4298,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2016-10-24 14:47:17","func_code":"def square_perimeter(l):\n return 4 * l","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18023,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2016-10-24 14:47:17","func_code":"def square_perimeter(l):\n return 4 * l","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":24102,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2016-10-24 14:47:17","func_code":"def rectangle_perimeter(c):\n return (c + c) * 2","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":7975,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2016-10-24 14:47:17","func_code":"def circle_area(a):\n return 3.14 * a ** 2","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17247,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2016-10-24 14:47:17","func_code":"def rectangle_perimeter(c):\n return (c + c) * 2","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":287,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2016-10-24 14:47:17","func_code":"def circle_circumference(b):\n return 2 * 3.14 * b","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28737,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2016-10-24 14:47:17","func_code":"def square_area(m):\n return m * m","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22807,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2016-10-24 14:47:17","func_code":"def circle_circumference(b):\n return 2 * 3.14 * b","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13646,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2016-10-24 14:47:17","func_code":"def circle_area(a):\n return 3.14 * a ** 2","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4153,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2016-10-24 14:47:19","func_code":"def square_area(l):\n return l * l","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32919,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2016-10-24 14:47:19","func_code":"def square_area(l):\n return l * l","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":3002,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2016-10-24 14:57:00","func_code":"def rectangle_perimeter(d, e):\n d = d + d\n e = e + e\n return d + e","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20239,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2016-10-24 14:57:00","func_code":"def square_area(n):\n n = n * n\n return n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4389,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2016-10-24 14:57:00","func_code":"def circle_circumference(c):\n c = 2 * 3.14 * c\n return c","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16730,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2016-10-24 14:57:00","func_code":"def square_perimeter(a):\n a = 4 * a\n return a","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38162,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2016-10-24 14:57:00","func_code":"def circle_area(b):\n b = b * b * 3.14\n return b","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27408,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2016-10-24 14:57:00","func_code":"def circle_area(b):\n b = b * b * 3.14\n return b","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40643,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2016-10-24 14:57:00","func_code":"def circle_circumference(c):\n c = 2 * 3.14 * c\n return c","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9494,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2016-10-24 14:57:00","func_code":"def square_perimeter(a):\n a = 4 * a\n return a","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29266,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2016-10-24 14:57:00","func_code":"def rectangle_perimeter(d, e):\n d = d + d\n e = e + e\n return d + e","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41504,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2016-10-24 14:57:00","func_code":"def square_area(n):\n n = n * n\n return n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16748,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2016-10-24 15:01:33","func_code":"def square_perimeter(a):\n a = 4 * a\n return a","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32358,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2016-10-24 15:01:33","func_code":"def circle_circumference(c):\n c = 2 * 3.14 * c\n return c","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39238,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2016-10-24 15:01:33","func_code":"def circle_area(b):\n b = b * b * 3.14\n return b","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16834,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2016-10-24 15:01:33","func_code":"def circle_circumference(c):\n c = 2 * 3.14 * c\n return c","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12723,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2016-10-24 15:01:33","func_code":"def circle_area(b):\n b = b * b * 3.14\n return b","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37807,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2016-10-24 15:01:33","func_code":"def square_area(n):\n n = n * n\n return n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28466,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2016-10-24 15:01:33","func_code":"def square_perimeter(a):\n a = 4 * a\n return a","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17213,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2016-10-24 15:01:33","func_code":"def rectangle_perimeter(l, w):\n l = l + l\n w = w + w\n return l + w","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40552,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2016-10-24 15:01:33","func_code":"def square_area(n):\n n = n * n\n return n","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25518,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2016-10-24 15:01:33","func_code":"def rectangle_perimeter(l, w):\n l = l + l\n w = w + w\n return l + w","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":3224,"user":"52d6165d-a6ff-4d05-9d24-6b0105a2b16c","date":"2016-10-24 15:23:39","func_code":"def square_perimeter(q):\n return q * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28930,"user":"52d6165d-a6ff-4d05-9d24-6b0105a2b16c","date":"2016-10-24 15:23:39","func_code":"def circle_area(r):\n return r * r * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27607,"user":"52d6165d-a6ff-4d05-9d24-6b0105a2b16c","date":"2016-10-24 15:23:39","func_code":"def rectangle_perimeter(l, w):\n return 2 * l + 2 * w","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16262,"user":"52d6165d-a6ff-4d05-9d24-6b0105a2b16c","date":"2016-10-24 15:23:39","func_code":"def rectangle_perimeter(l, w):\n return 2 * l + 2 * w","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38072,"user":"52d6165d-a6ff-4d05-9d24-6b0105a2b16c","date":"2016-10-24 15:23:39","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23427,"user":"52d6165d-a6ff-4d05-9d24-6b0105a2b16c","date":"2016-10-24 15:23:39","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16796,"user":"52d6165d-a6ff-4d05-9d24-6b0105a2b16c","date":"2016-10-24 15:23:39","func_code":"def square_perimeter(q):\n return q * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":24426,"user":"52d6165d-a6ff-4d05-9d24-6b0105a2b16c","date":"2016-10-24 15:23:39","func_code":"def circle_area(r):\n return r * r * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15786,"user":"52d6165d-a6ff-4d05-9d24-6b0105a2b16c","date":"2016-10-24 15:23:39","func_code":"def circle_circumference(s):\n return 2 * 3.14 * s","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28717,"user":"52d6165d-a6ff-4d05-9d24-6b0105a2b16c","date":"2016-10-24 15:23:39","func_code":"def circle_circumference(s):\n return 2 * 3.14 * s","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":30432,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-10-24 19:37:41","func_code":"def circle_area(radius):\n area = 3.14 * (radius * radius)\n return area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2855,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-10-24 19:37:41","func_code":"def circle_circumference(radius):\n circumference = 2 * 3.14 * radius\n return circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":24215,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-10-24 19:37:41","func_code":"def square_perimeter(side):\n per = side * 4\n return per","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":26125,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-10-24 19:37:41","func_code":"def square_perimeter(side):\n per = side * 4\n return per","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12680,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-10-24 19:37:41","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2525,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-10-24 19:37:41","func_code":"def circle_circumference(radius):\n circumference = 2 * 3.14 * radius\n return circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16512,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-10-24 19:37:41","func_code":"def circle_area(radius):\n area = 3.14 * (radius * radius)\n return area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22817,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-10-24 19:37:41","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2698,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-10-24 19:37:41","func_code":"def rectangle_perimeter(length, width):\n rp = 2 * (length + width)\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13078,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2016-10-24 19:37:41","func_code":"def rectangle_perimeter(length, width):\n rp = 2 * (length + width)\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32507,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-25 17:39:00","func_code":"def circle_circumference(r):\n return r * 2 * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14444,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-25 17:39:00","func_code":"def circle_area(r):\n return r * r * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33401,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-25 17:39:00","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38349,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-25 17:39:00","func_code":"def rectangle_perimeter(l, w):\n return 2 * (l + w)","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14700,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2016-10-25 17:39:00","func_code":"def square_perimeter(side):\n return 4 * side","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":21143,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2016-11-21 14:21:23","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31169,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2016-11-27 13:40:27","func_code":"def square_area(r):\n return r * r","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20247,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2016-11-27 13:52:15","func_code":"def rectangle_perimeter(x, y):\n return 2 * x + 2 * y","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15434,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2016-11-27 13:52:15","func_code":"def circle_circumference(r):\n return 2 * r * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5504,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2016-11-27 13:52:15","func_code":"def circle_area(r):\n return r * r * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6655,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2016-11-27 13:52:15","func_code":"def square_area(r):\n return r * r","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35515,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2016-11-27 13:52:15","func_code":"def square_perimeter(r):\n return 4 * r","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4274,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2016-11-27 21:04:49","func_code":"def reverse(test):\n b = []\n i = 0\n while i < len(test):\n b.append(test[len(test) - 1 - i])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":16458,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-11-29 12:21:42","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":32531,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-11-29 12:35:53","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":11055,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-11-29 12:35:53","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26006,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-11-29 12:59:22","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - 1 - i\n t = a[i]\n a[i] = a[j]\n a[j] = t\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":34701,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-11-29 13:08:25","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":13209,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2016-11-29 13:08:25","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":2550,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2016-11-29 14:02:02","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":8611,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2016-11-29 14:02:50","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":24217,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2016-11-29 14:02:58","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":32360,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2016-11-29 14:03:35","func_code":"def double(n):\n return n + n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15578,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2016-11-29 14:04:39","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":18311,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2016-11-29 14:04:41","func_code":"def double(n):\n y = n * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":6420,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2016-11-29 14:04:42","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":36018,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2016-11-29 14:04:43","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":1788,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2016-11-29 14:05:07","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":38787,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2016-11-29 14:05:36","func_code":"def double(n):\n return n + n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":196,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2016-11-29 14:05:54","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":16568,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2016-11-29 14:06:15","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15114,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2016-11-29 14:06:31","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":17530,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2016-11-29 14:06:44","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":36220,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2016-11-29 14:06:44","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26644,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2016-11-29 14:06:54","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":3827,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2016-11-29 14:07:22","func_code":"def area(r):\n y = pi * r * r\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":1012,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2016-11-29 14:07:22","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":32009,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2016-11-29 14:07:24","func_code":"def double(x):\n return x * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":38919,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2016-11-29 14:07:48","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":36802,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2016-11-29 14:08:25","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":31379,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2016-11-29 14:08:25","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":18309,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2016-11-29 14:08:37","func_code":"def area(r):\n y = pi * r * r\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15092,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2016-11-29 14:08:37","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39058,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2016-11-29 14:08:46","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":27478,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2016-11-29 14:09:29","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25611,"user":"621f49f9-6d90-49c2-ada6-2cb48080552a","date":"2016-11-29 14:09:37","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":42230,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2016-11-29 14:09:59","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":21843,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2016-11-29 14:10:00","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25778,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2016-11-29 14:10:00","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":27841,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2016-11-29 14:10:11","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":21898,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2016-11-29 14:10:15","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25298,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2016-11-29 14:10:15","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":42130,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2016-11-29 14:10:33","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15687,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2016-11-29 14:10:33","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26115,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2016-11-29 14:10:40","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":38409,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2016-11-29 14:10:40","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":12534,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-29 14:11:04","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":24065,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2016-11-29 14:11:05","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25739,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2016-11-29 14:11:18","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":27296,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2016-11-29 14:11:32","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13512,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2016-11-29 14:11:33","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":35272,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2016-11-29 14:11:33","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":28690,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2016-11-29 14:11:40","func_code":"def double(x):\n return 2 * x","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":3188,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2016-11-29 14:11:45","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4858,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2016-11-29 14:11:47","func_code":"def double(n):\n y = n * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13143,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2016-11-29 14:12:08","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":27333,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2016-11-29 14:12:20","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25583,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2016-11-29 14:12:20","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":38281,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2016-11-29 14:12:25","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":29232,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2016-11-29 14:12:27","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":8192,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2016-11-29 14:12:28","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39955,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2016-11-29 14:12:28","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39220,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2016-11-29 14:12:57","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25504,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2016-11-29 14:13:07","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":1211,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2016-11-29 14:13:07","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4430,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-11-29 14:13:20","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":38312,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2016-11-29 14:13:22","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41569,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2016-11-29 14:13:30","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4108,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2016-11-29 14:13:31","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":28130,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2016-11-29 14:13:31","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":17248,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2016-11-29 14:13:55","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26874,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2016-11-29 14:13:55","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":3848,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-11-29 14:14:14","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":33355,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2016-11-29 14:14:22","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":30685,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2016-11-29 14:14:27","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":2621,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-11-29 14:14:37","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15085,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2016-11-29 14:14:50","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":23895,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2016-11-29 14:14:53","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":8206,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2016-11-29 14:14:53","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":38795,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2016-11-29 14:15:04","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":6713,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2016-11-29 14:15:11","func_code":"def area(r):\n a = pi * r * r\n return a","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13261,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2016-11-29 14:15:11","func_code":"def circumference(r):\n c = 2 * pi * r\n return c","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":3430,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2016-11-29 14:15:28","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37355,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2016-11-29 14:15:37","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39734,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2016-11-29 14:15:37","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13785,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2016-11-29 14:16:10","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15923,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2016-11-29 14:16:10","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39689,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2016-11-29 14:16:11","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":38203,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2016-11-29 14:16:11","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4155,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2016-11-29 14:17:12","func_code":"def circumference(r):\n return 2 * PI * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":35987,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2016-11-29 14:17:12","func_code":"def area(r):\n return PI * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":18050,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2016-11-29 14:17:15","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n for i in range(len(a) \/ 2):\n swap(a, i, len(a) - i - 1)","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":30294,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-11-29 14:17:17","func_code":"def circumference(r):\n return 2 * r * pi","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":24598,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-11-29 14:17:17","func_code":"def area(r):\n return r ** 2 * pi","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":23647,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2016-11-29 14:17:18","func_code":"def area(x):\n y = pi * x * x\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":34785,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2016-11-29 14:17:18","func_code":"def circumference(x):\n y = 2 * pi * x\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39460,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2016-11-29 14:17:20","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13205,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2016-11-29 14:17:47","func_code":"def double(x):\n return 2 * x","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":32474,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-29 14:17:48","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":21783,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-29 14:17:48","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":34816,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2016-11-29 14:17:57","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":753,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2016-11-29 14:17:57","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":9539,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2016-11-29 14:18:32","func_code":"def double(x):\n return x + x","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26224,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2016-11-29 14:18:42","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41420,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2016-11-29 14:18:42","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":16337,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2016-11-29 14:18:42","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39256,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2016-11-29 14:18:44","func_code":"def area(r):\n a = pi * r * r\n return a","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":12423,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2016-11-29 14:18:55","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":3051,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2016-11-29 14:18:57","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4967,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2016-11-29 14:18:57","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19157,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2016-11-29 14:18:57","func_code":"def double(x):\n return x * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":29671,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2016-11-29 14:19:08","func_code":"def double(x):\n return x * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":6673,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2016-11-29 14:19:10","func_code":"def double(n):\n n = n * 2\n return n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15717,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2016-11-29 14:19:13","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":9927,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2016-11-29 14:19:13","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":38950,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-11-29 14:19:34","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19860,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-11-29 14:19:34","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":36183,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2016-11-29 14:20:00","func_code":"def double(n):\n y = n * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4031,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2016-11-29 14:20:07","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":30860,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2016-11-29 14:20:19","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":35383,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2016-11-29 14:20:19","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":11652,"user":"4733f087-f7f5-4b28-b898-9a23b2f59251","date":"2016-11-29 14:20:20","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":17536,"user":"4733f087-f7f5-4b28-b898-9a23b2f59251","date":"2016-11-29 14:20:20","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":21352,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2016-11-29 14:20:32","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4440,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2016-11-29 14:20:32","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":20016,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2016-11-29 14:20:36","func_code":"def area(n):\n return pi * n ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":22791,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2016-11-29 14:20:36","func_code":"def circumference(n):\n return 2 * pi * n","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19059,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2016-11-29 14:20:37","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":16804,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2016-11-29 14:20:37","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41710,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2016-11-29 14:20:39","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":17345,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2016-11-29 14:20:42","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":36768,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2016-11-29 14:20:43","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":38987,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2016-11-29 14:20:43","func_code":"def circumference(r):\n return pi * r * 2","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":3029,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2016-11-29 14:21:01","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":20637,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2016-11-29 14:21:01","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":20188,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2016-11-29 14:21:03","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":14782,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2016-11-29 14:21:03","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":8212,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2016-11-29 14:21:18","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":8863,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2016-11-29 14:21:18","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":27751,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2016-11-29 14:21:55","func_code":"def area(r):\n y = 3.141 * r * r\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":31090,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2016-11-29 14:21:55","func_code":"def circumference(r):\n y = 2 * 3.141 * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":7342,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2016-11-29 14:21:57","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":34067,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2016-11-29 14:22:17","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":33143,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2016-11-29 14:22:36","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":3980,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2016-11-29 14:22:39","func_code":"def area(r):\n y = pi * r * r\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":12316,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2016-11-29 14:22:39","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13138,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2016-11-29 14:22:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":35248,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2016-11-29 14:22:50","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":229,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2016-11-29 14:22:58","func_code":"def double(n):\n y = n * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":38887,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2016-11-29 14:23:04","func_code":"def double(n):\n y = n * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":9313,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2016-11-29 14:23:41","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":8897,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2016-11-29 14:23:41","func_code":"def area(r):\n y = pi * r * r\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19832,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2016-11-29 14:23:45","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":34974,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2016-11-29 14:23:48","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":36036,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2016-11-29 14:23:48","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":21235,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2016-11-29 14:23:57","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37179,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2016-11-29 14:23:57","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13506,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2016-11-29 14:24:09","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":7354,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2016-11-29 14:24:09","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":6447,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2016-11-29 14:24:31","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":28388,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2016-11-29 14:24:31","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":20302,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2016-11-29 14:24:39","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":22717,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2016-11-29 14:24:59","func_code":"def double(x):\n return 2 * x","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41904,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2016-11-29 14:25:05","func_code":"def area(r):\n r * r * pi","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4482,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2016-11-29 14:25:05","func_code":"def circumference(r):\n return r * 2 * pi","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":2050,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2016-11-29 14:25:25","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":6888,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2016-11-29 14:25:32","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37548,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2016-11-29 14:25:32","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":7650,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2016-11-29 14:25:40","func_code":"def area(r):\n y = pi * r * r\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":1908,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2016-11-29 14:25:40","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":35878,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2016-11-29 14:25:57","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":28803,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2016-11-29 14:25:57","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":7395,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2016-11-29 14:25:59","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":5614,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2016-11-29 14:26:18","func_code":"def circumference(r):\n y = 2 * 3.141 * int(r)\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41354,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2016-11-29 14:26:18","func_code":"def area(r):\n y = 3.141 * int(r) ** 2\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39851,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2016-11-29 14:26:27","func_code":"def circumference(r):\n return r * 2 * 3.141","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":14160,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2016-11-29 14:26:33","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":15046,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-29 14:27:09","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - 1 - i\n swap(a, i, j)\n i += 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":33571,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2016-11-29 14:27:15","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[p] >= a[j]:\n p = j\n j += 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":27388,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2016-11-29 14:27:28","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":26032,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2016-11-29 14:27:28","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":23933,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2016-11-29 14:28:02","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":34429,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2016-11-29 14:28:15","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":36934,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2016-11-29 14:28:40","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15530,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2016-11-29 14:28:40","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":31444,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2016-11-29 14:28:54","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":39763,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2016-11-29 14:29:04","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":28962,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2016-11-29 14:29:13","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n for i in range(0, len(a) \/ 2):\n swap(a, i, len(a) - i - 1)","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":12592,"user":"4733f087-f7f5-4b28-b898-9a23b2f59251","date":"2016-11-29 14:29:20","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19592,"user":"4733f087-f7f5-4b28-b898-9a23b2f59251","date":"2016-11-29 14:29:20","func_code":"def area(n):\n return 3.141 * n ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":35303,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2016-11-29 14:29:52","func_code":"def area(r):\n return pi * (r * r)","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":18282,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2016-11-29 14:29:52","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":673,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2016-11-29 14:29:55","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":21240,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2016-11-29 14:29:55","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":36352,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2016-11-29 14:30:05","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41860,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2016-11-29 14:30:05","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":11591,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2016-11-29 14:30:09","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":22199,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2016-11-29 14:30:57","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":2664,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2016-11-29 14:30:59","func_code":"def double(n):\n y = n * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26843,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2016-11-29 14:30:59","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":7307,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2016-11-29 14:31:11","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":12897,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2016-11-29 14:31:29","func_code":"def area(n):\n return pi * n ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":104,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2016-11-29 14:31:29","func_code":"def circumference(n):\n return pi * n * 2","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":10067,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2016-11-29 14:31:45","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25710,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2016-11-29 14:31:45","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n for i in range(len(a)):\n smallest = i\n for j in range(i, len(a)):\n if a[j] < a[smallest]:\n smallest = j\n swap(a, i, smallest)\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":28107,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2016-11-29 14:31:45","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n for i in range(len(a)):\n smallest = i\n for j in range(i, len(a)):\n if a[j] < a[smallest]:\n smallest = j\n swap(a, i, smallest)\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":21280,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2016-11-29 14:31:48","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":36985,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2016-11-29 14:31:48","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":35221,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2016-11-29 14:31:56","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":84,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2016-11-29 14:31:56","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":18922,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2016-11-29 14:32:15","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":19907,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2016-11-29 14:32:18","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":10091,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2016-11-29 14:32:44","func_code":"def swap(a, x, y):\n tmp = a[x]\n a[x] = a[y]\n a[y] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":11140,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2016-11-29 14:32:45","func_code":"def double(n):\n y = 2 * n\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15632,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2016-11-29 14:33:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":29120,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2016-11-29 14:33:06","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i += 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":27424,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2016-11-29 14:33:26","func_code":"def double(n):\n double_val = n * 2\n return double_val","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37256,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2016-11-29 14:33:36","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37819,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2016-11-29 14:33:36","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37584,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2016-11-29 14:33:37","func_code":"def selection_sort(a):\n return a.sort()","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":39681,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2016-11-29 14:33:37","func_code":"def selection_sort(a):\n return a.sort()","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":37848,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2016-11-29 14:33:51","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15389,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2016-11-29 14:33:51","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":6636,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2016-11-29 14:34:00","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i += 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":18897,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2016-11-29 14:34:01","func_code":"def area(r):\n return 3.141 * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":23479,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2016-11-29 14:34:01","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41281,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2016-11-29 14:34:01","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":21163,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2016-11-29 14:34:01","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4120,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2016-11-29 14:34:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":27832,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2016-11-29 14:34:31","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":10761,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2016-11-29 14:34:31","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":5270,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2016-11-29 14:34:44","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":31258,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2016-11-29 14:34:44","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":21334,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2016-11-29 14:35:05","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39768,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2016-11-29 14:35:05","func_code":"def area(r):\n return pi * (r * r)","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":32626,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2016-11-29 14:35:11","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":19250,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2016-11-29 14:35:13","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":38767,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2016-11-29 14:35:48","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":3907,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2016-11-29 14:35:59","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":18263,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2016-11-29 14:35:59","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":3637,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2016-11-29 14:36:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":12724,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-11-29 14:36:17","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":18541,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-11-29 14:36:17","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":23779,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2016-11-29 14:36:45","func_code":"def area(r):\n ans = pi * r ** 2\n return ans","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":12555,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2016-11-29 14:36:45","func_code":"def circumference(r):\n ans = 2 * pi * r\n return ans","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":18380,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2016-11-29 14:37:07","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":16504,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2016-11-29 14:37:07","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26583,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2016-11-29 14:37:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":3085,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2016-11-29 14:37:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":14083,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2016-11-29 14:37:40","func_code":"def double(n):\n m = n * 2\n return m","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":24145,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2016-11-29 14:38:03","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":31002,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2016-11-29 14:38:03","func_code":"def area(r):\n y = pi * r ** 2\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37024,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2016-11-29 14:38:06","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":42157,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2016-11-29 14:38:06","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":12622,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2016-11-29 14:38:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n b = 0\n while b < len(a) \/ 2:\n swap(a, b, len(a) - b - 1)\n b += 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":37498,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2016-11-29 14:38:33","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":35423,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2016-11-29 14:38:34","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":3720,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2016-11-29 14:38:34","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":24752,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2016-11-29 14:38:52","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i <= j:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":30321,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2016-11-29 14:39:00","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":26927,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2016-11-29 14:39:37","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":17041,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2016-11-29 14:39:37","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41493,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2016-11-29 14:39:48","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n k = 0\n while k < len(a) \/ 2:\n swap(a, k, len(a) - k - 1)\n k += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":27057,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2016-11-29 14:39:59","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":10361,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2016-11-29 14:40:17","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":35463,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2016-11-29 14:40:18","func_code":"def circumference(c):\n return 2 * 3.141 * c","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":8671,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2016-11-29 14:40:18","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":35946,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2016-11-29 14:40:49","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":5588,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2016-11-29 14:40:49","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":9201,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2016-11-29 14:40:54","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13616,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2016-11-29 14:40:54","func_code":"def area(x):\n return pi * x ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":40635,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2016-11-29 14:41:19","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":36406,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2016-11-29 14:41:19","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":1499,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2016-11-29 14:41:43","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":28065,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2016-11-29 14:41:43","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":35554,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2016-11-29 14:42:25","func_code":"def area(r):\n actual_area = 3.141 * r ** 2\n return actual_area","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":30672,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2016-11-29 14:42:25","func_code":"def circumference(r):\n actual_circumference = 2 * 3.141 * r\n return actual_circumference","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":24099,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2016-11-29 14:42:34","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":2589,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2016-11-29 14:42:49","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i += 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":27492,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2016-11-29 14:43:02","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":36316,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2016-11-29 14:43:07","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":15448,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2016-11-29 14:43:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":16134,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2016-11-29 14:44:00","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":18235,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2016-11-29 14:44:16","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":10776,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2016-11-29 14:44:22","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":656,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2016-11-29 14:44:22","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":10707,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2016-11-29 14:44:25","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":5463,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2016-11-29 14:44:25","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":33482,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2016-11-29 14:44:58","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":19451,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2016-11-29 14:45:02","func_code":"def swap(a, x, y):\n tmp = a[x]\n a[x] = a[y]\n a[y] = tmp\n return a\n\n\ndef selection_sort(a):\n k = 0\n while k < len(a):\n j = k + 1\n p = k\n tmp = 0\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n swap(a, k, p)\n k += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":33860,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2016-11-29 14:45:02","func_code":"def swap(a, x, y):\n tmp = a[x]\n a[x] = a[y]\n a[y] = tmp\n return a\n\n\ndef selection_sort(a):\n k = 0\n while k < len(a):\n j = k + 1\n p = k\n tmp = 0\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n swap(a, k, p)\n k += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":7085,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-11-29 14:45:17","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":23953,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2016-11-29 14:45:38","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i += 1\n j -= 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":33526,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2016-11-29 14:45:57","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":36224,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2016-11-29 14:45:57","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":32966,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2016-11-29 14:46:02","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":9756,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2016-11-29 14:46:07","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":7021,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2016-11-29 14:46:07","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":26282,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2016-11-29 14:46:11","func_code":"def area(a):\n x = 3.141 * a ** 2\n return x","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":30264,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2016-11-29 14:46:11","func_code":"def circumference(r):\n y = 3.141 * 2 * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":38244,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2016-11-29 14:46:18","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":3695,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2016-11-29 14:46:39","func_code":"def selection_sort(a):\n for i in range(0, len(a)):\n p = i\n curr_low = p\n while p < len(a):\n if a[p] < a[curr_low]:\n curr_low = p\n p += 1\n tmp = a[i]\n a[i] = a[curr_low]\n a[curr_low] = tmp","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":10833,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2016-11-29 14:46:39","func_code":"def selection_sort(a):\n for i in range(0, len(a)):\n p = i\n curr_low = p\n while p < len(a):\n if a[p] < a[curr_low]:\n curr_low = p\n p += 1\n tmp = a[i]\n a[i] = a[curr_low]\n a[curr_low] = tmp","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":15574,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2016-11-29 14:47:16","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":42010,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2016-11-29 14:47:22","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":29284,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2016-11-29 14:47:23","func_code":"def double(x):\n return x * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":29404,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2016-11-29 14:47:23","func_code":"def double(x):\n return x * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":23084,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2016-11-29 14:47:51","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":30811,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2016-11-29 14:48:29","func_code":"def selection_sort(a):\n p = 0\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":32508,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2016-11-29 14:48:29","func_code":"def selection_sort(a):\n p = 0\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":20268,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2016-11-29 14:49:10","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":18965,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2016-11-29 14:49:14","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":36703,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2016-11-29 14:49:14","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":29712,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-11-29 14:49:39","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":10975,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-11-29 14:49:39","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":42332,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2016-11-29 14:49:48","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":21473,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2016-11-29 14:50:37","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":18,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2016-11-29 14:50:37","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":37531,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2016-11-29 14:50:50","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":14334,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2016-11-29 14:50:50","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":40214,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2016-11-29 14:50:57","func_code":"def circumference(r):\n q = 2 * 3.141 * r\n return q","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":12027,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2016-11-29 14:50:57","func_code":"def area(r):\n s = 3.141 * r ** 2\n return s","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":6744,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-11-29 14:51:03","func_code":"def selection_sort(a):\n i = 0\n while i < len(a) - 1:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":14859,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2016-11-29 14:51:03","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":15208,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2016-11-29 14:51:03","func_code":"def selection_sort(a):\n i = 0\n while i < len(a) - 1:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":23553,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2016-11-29 14:51:25","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":23778,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2016-11-29 14:51:25","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":8246,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2016-11-29 14:53:07","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - i - 1\n swap(a, i, j)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":27445,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2016-11-29 14:53:09","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":566,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2016-11-29 14:53:09","func_code":"def find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":27721,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2016-11-29 14:53:11","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":1101,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2016-11-29 14:53:16","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":13267,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2016-11-29 14:53:29","func_code":"def reverse(a):\n i = 0\n j = -1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":33812,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2016-11-29 14:53:37","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":12290,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2016-11-29 14:53:37","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":20905,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2016-11-29 14:54:10","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n minimum = i\n while j < len(a):\n if a[j] < a[minimum]:\n minimum = j\n j += 1\n tmp = a[minimum]\n a[minimum] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":19785,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2016-11-29 14:54:10","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n minimum = i\n while j < len(a):\n if a[j] < a[minimum]:\n minimum = j\n j += 1\n tmp = a[minimum]\n a[minimum] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":16439,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2016-11-29 14:54:13","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":25593,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2016-11-29 14:54:17","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":40855,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2016-11-29 14:54:42","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":15888,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2016-11-29 14:54:42","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":4144,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2016-11-29 14:54:53","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":8722,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2016-11-29 14:54:53","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":37925,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2016-11-29 14:55:32","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":7184,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2016-11-29 14:55:32","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":21522,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2016-11-29 14:55:33","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":7968,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2016-11-29 14:55:33","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":23691,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2016-11-29 14:55:34","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":1938,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2016-11-29 14:55:34","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":23881,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2016-11-29 14:55:39","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":38830,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2016-11-29 14:56:01","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":32270,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2016-11-29 14:56:01","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":28951,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2016-11-29 14:56:05","func_code":"def reverse(a):\n a.reverse()\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":19396,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2016-11-29 14:56:23","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":17185,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-29 14:56:29","func_code":"def find_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":2591,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-29 14:56:29","func_code":"def find_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":13004,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2016-11-29 14:56:35","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":18690,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2016-11-29 14:56:35","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":19471,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2016-11-29 14:56:48","func_code":"def selection_sort(a):\n p = 0\n j = 0\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":38865,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2016-11-29 14:56:48","func_code":"def selection_sort(a):\n p = 0\n j = 0\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":38892,"user":"621f49f9-6d90-49c2-ada6-2cb48080552a","date":"2016-11-29 14:56:49","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37636,"user":"621f49f9-6d90-49c2-ada6-2cb48080552a","date":"2016-11-29 14:56:49","func_code":"def area(r):\n y = pi * r ** 2\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":14103,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2016-11-29 14:56:58","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":12424,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2016-11-29 14:57:05","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":10237,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2016-11-29 14:57:14","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":4758,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2016-11-29 14:57:14","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":31093,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2016-11-29 14:57:30","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":33988,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2016-11-29 14:57:30","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":8632,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2016-11-29 14:57:39","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":4376,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2016-11-29 14:58:20","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":40148,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2016-11-29 14:58:31","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":3331,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2016-11-29 14:58:31","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":17936,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2016-11-29 14:59:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - 1 - i\n swap(a, i, j)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":35166,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-11-29 14:59:07","func_code":"def swap(a, i, j):\n a[i], a[j] = a[j], a[i]\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":7990,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2016-11-29 14:59:35","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":7482,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2016-11-29 14:59:35","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":15537,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-11-29 14:59:40","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i\n while j < len(a):\n if a[j] < a[i]:\n a[i], a[j] = a[j], a[i]\n j += 1\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":20606,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2016-11-29 14:59:40","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i\n while j < len(a):\n if a[j] < a[i]:\n a[i], a[j] = a[j], a[i]\n j += 1\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":26646,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2016-11-29 14:59:45","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":3023,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2016-11-29 14:59:45","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":17190,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2016-11-29 15:00:16","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":16187,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2016-11-29 15:01:04","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":27270,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2016-11-29 15:01:04","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":17137,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2016-11-29 15:01:04","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":18906,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2016-11-29 15:01:34","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":37720,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2016-11-29 15:01:34","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":335,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2016-11-29 15:01:51","func_code":"def reverse(a):\n i = 0\n j = -1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":372,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2016-11-29 15:06:22","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25145,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2016-11-29 15:06:27","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":35227,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2016-11-29 15:06:27","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":26476,"user":"4733f087-f7f5-4b28-b898-9a23b2f59251","date":"2016-11-29 15:06:39","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i <= j:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":36386,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2016-11-29 15:06:56","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":28344,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2016-11-29 15:07:01","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":18876,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2016-11-29 15:08:16","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":25354,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2016-11-29 15:08:16","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":4626,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2016-11-29 15:09:03","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":14413,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2016-11-29 15:09:03","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":15630,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2016-11-29 15:09:37","func_code":"def circumference(n):\n return 2 * 3.141 * n","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":1666,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2016-11-29 15:09:37","func_code":"def area(n):\n return 3.141 * n ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":32902,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2016-11-29 15:09:47","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":34788,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2016-11-29 15:09:55","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":22933,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2016-11-29 15:09:55","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":40714,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2016-11-29 15:10:48","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":813,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2016-11-29 15:10:48","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":12257,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2016-11-29 15:11:41","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":39988,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2016-11-29 15:11:41","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":37969,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2016-11-29 15:11:54","func_code":"def area(n):\n p * n ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":29218,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2016-11-29 15:12:57","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":33971,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2016-11-29 15:12:57","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":7877,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2016-11-29 15:13:16","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":31089,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2016-11-29 15:13:16","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":23743,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2016-11-29 15:13:40","func_code":"def selection_sort(a):\n i = 0\n j = 1\n while i < len(a):\n j = i\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":2485,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2016-11-29 15:13:40","func_code":"def selection_sort(a):\n i = 0\n j = 1\n while i < len(a):\n j = i\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":19633,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2016-11-29 15:16:14","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":27178,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2016-11-29 15:16:14","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":10096,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2016-11-29 15:16:45","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":31303,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2016-11-29 15:17:43","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":14277,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2016-11-29 15:19:50","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":34201,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2016-11-29 15:19:50","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":17974,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2016-11-29 15:21:18","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":11762,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2016-11-29 15:21:18","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":21013,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2016-11-29 15:21:18","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":28885,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2016-11-29 15:21:18","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":8952,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2016-11-29 15:21:34","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":9239,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2016-11-29 15:21:34","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":4956,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2016-11-29 15:21:43","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":32473,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2016-11-29 15:22:42","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":11275,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2016-11-29 15:22:42","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":9816,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2016-11-29 15:22:48","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n print(tmp)\n i += 1\n return tmp","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":17995,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2016-11-29 15:22:48","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n print(tmp)\n i += 1\n return tmp","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":40071,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2016-11-29 15:24:41","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":1071,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2016-11-29 15:25:31","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":9021,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2016-11-29 15:25:31","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":22997,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2016-11-29 15:25:43","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":8356,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2016-11-29 15:25:43","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":3084,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2016-11-29 15:25:46","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_smallest_value(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_value(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":6676,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2016-11-29 15:25:46","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_smallest_value(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_value(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":34650,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2016-11-29 15:26:34","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":41835,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2016-11-29 15:26:34","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":35761,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2016-11-29 15:26:35","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":14386,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2016-11-29 15:27:36","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":1352,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2016-11-29 15:27:36","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":31404,"user":"621f49f9-6d90-49c2-ada6-2cb48080552a","date":"2016-11-29 15:31:40","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":14408,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2016-11-29 15:37:33","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39399,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2016-11-29 15:43:16","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19862,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2016-11-29 15:43:16","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":11958,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2016-11-29 15:51:49","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i <= j:\n swap(a, i, j)\n i += 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":27266,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2016-11-29 15:52:09","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":38052,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2016-11-29 15:52:09","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":33145,"user":"621f49f9-6d90-49c2-ada6-2cb48080552a","date":"2016-11-29 15:52:17","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":41579,"user":"621f49f9-6d90-49c2-ada6-2cb48080552a","date":"2016-11-29 15:52:17","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":26708,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2016-11-29 15:53:23","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":17067,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2016-11-29 15:53:32","func_code":"def smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":15753,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2016-11-29 15:53:32","func_code":"def smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":27343,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2016-11-29 15:54:40","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":23043,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2016-11-29 15:54:40","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_smallest_position(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest_position(a, i)\n swap(a, i, p)\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":32944,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-11-29 17:38:45","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":8559,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-11-29 17:41:05","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":11757,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-11-29 17:41:05","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25363,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2016-11-29 17:50:08","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":2850,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2016-11-29 18:46:51","func_code":"def double(n):\n y = n * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":1204,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2016-11-29 18:46:51","func_code":"def double(n):\n y = n * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19092,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2016-11-29 19:08:08","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":521,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2016-11-29 19:08:08","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25952,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-11-29 21:40:44","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, len(a) - 1 - i, i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":33556,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-11-29 21:42:54","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":30550,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2016-11-29 21:42:54","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":751,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-30 17:30:32","func_code":"def swap(a, i, p):\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n\n\ndef findsmallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = findsmallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":7564,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2016-11-30 17:30:32","func_code":"def swap(a, i, p):\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n\n\ndef findsmallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = findsmallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":32464,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-02 22:41:51","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":38448,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-02 22:41:51","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-02 22:47:21","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":17976,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-02 22:47:21","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":22824,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-02 22:47:21","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":6783,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-02 22:47:21","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":17119,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-02 22:47:21","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":2104,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-02 22:47:21","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":11945,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-03 13:20:26","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i != j:\n swap(a, i, j)\n i += 1\n j -= 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":31694,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-03 13:21:48","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2 - 1:\n swap(a, i, j)\n i += 1\n j -= 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":28558,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-03 13:22:44","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i += 1\n j -= 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":40445,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-03 13:22:44","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i += 1\n j -= 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":37973,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-03 13:51:22","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n temp = a[i]\n a[i] = a[p]\n a[p] = temp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":6912,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-01-03 13:51:22","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n temp = a[i]\n a[i] = a[p]\n a[p] = temp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":30026,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-01-09 19:36:57","func_code":"def reverse(list):\n reversed = []\n i = len(list) - 1\n while i >= 0:\n reversed.append(list[i])\n i = i - 1\n return reversed","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":25932,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-01-09 19:36:57","func_code":"def reverse(list):\n reversed = []\n i = len(list) - 1\n while i >= 0:\n reversed.append(list[i])\n i = i - 1\n return reversed","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":21648,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-14 11:19:28","func_code":"def find_smallest(a, i):\n p = i\n q = i + 1\n while q < len(a):\n if a[q] < a[p]:\n p = q\n q += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":5132,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-14 11:19:28","func_code":"def find_smallest(a, i):\n p = i\n q = i + 1\n while q < len(a):\n if a[q] < a[p]:\n p = q\n q += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = find_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":39812,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-01-15 11:15:13","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":41838,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-01-15 11:15:13","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1293,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-01-15 12:04:05","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":28102,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-01-15 12:04:05","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":16832,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 02:29:03","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":17906,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 02:32:10","func_code":"def circumference(r):\n y = 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":16658,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 02:32:10","func_code":"def area(r):\n y = pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":9853,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-01-16 05:18:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":17235,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-01-16 05:18:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":4984,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-01-16 05:18:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":27764,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-16 09:03:26","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":4944,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-16 09:04:22","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":38547,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-16 09:05:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":2764,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-16 09:05:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":28248,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-01-16 09:05:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":23782,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-01-16 10:20:02","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37805,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-01-16 10:20:02","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":332,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-01-16 10:22:58","func_code":"def area(r):\n return 3.14 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26249,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-01-16 10:22:58","func_code":"def circumference(r):\n return 3.14 * r * 2","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15069,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-01-16 10:23:38","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4436,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-01-16 10:23:38","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":35683,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-01-16 10:23:38","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":3543,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-01-16 10:23:38","func_code":"def circumference(r):\n return 3.141 * r * 2","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":31720,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-01-16 10:23:38","func_code":"def circumference(r):\n return 3.141 * r * 2","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":5182,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-01-16 10:23:38","func_code":"def circumference(r):\n return 3.141 * r * 2","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":5913,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 13:25:45","func_code":"def double(x):\n return 2 * x","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":30617,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 13:25:45","func_code":"def double(x):\n return 2 * x","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":17163,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 13:25:53","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19402,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 13:25:53","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19683,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 13:26:56","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":21001,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 13:26:56","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39510,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 13:26:56","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":24546,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 13:26:56","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4534,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 13:26:56","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41909,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-01-16 13:26:56","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":30233,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:38:08","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39172,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:38:08","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42281,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31858,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4904,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def rectangle_perimeter(l, w):\n return 2 * (l + w)","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41720,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def circle_area(r):\n return r * r * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17956,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def circle_area(r):\n return r * r * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15466,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25801,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def square_perimeter(side):\n return 4 * side","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":58,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def rectangle_perimeter(l, w):\n return 2 * (l + w)","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22405,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def circle_circumference(r):\n return r * 2 * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12031,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def square_perimeter(side):\n return 4 * side","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4447,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def square_perimeter(side):\n return 4 * side","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10274,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def rectangle_perimeter(l, w):\n return 2 * (l + w)","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40291,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def circle_circumference(r):\n return r * 2 * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10300,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def circle_circumference(r):\n return r * 2 * 3.14","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27838,"user":"e45f938b-9d5c-4838-86ce-0755e3c97053","date":"2017-01-19 15:49:10","func_code":"def circle_area(r):\n return r * r * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40232,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-01-19 21:10:59","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22831,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-01-19 21:10:59","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11598,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-01-19 21:10:59","func_code":"def square_area(side):\n return side * side","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":30143,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-01-21 16:46:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":266,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-01-21 16:46:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3006,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-02-07 15:55:59","func_code":"def double(n):\n m = n * 2\n print(m)","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":40664,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-02-07 15:58:03","func_code":"def double(n):\n m = n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":33051,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-02-07 16:05:07","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41700,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-02-07 16:05:07","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":9079,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-02-24 11:11:03","func_code":"def swap_keys_values(d):\n return dict([(v, k) for k, v in list(d.items())])","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":1681,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-02-24 11:11:03","func_code":"def swap_keys_values(d):\n return dict([(v, k) for k, v in list(d.items())])","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":30791,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-02-24 11:11:37","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":36223,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-02-24 11:11:37","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":20046,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 11:51:46","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":11297,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 11:51:46","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":6316,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 11:55:28","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.values())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":19820,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:00:20","func_code":"def swap_keys_values(d):\n d2\n for key in d:\n d2[d[key]] = key\n return d2","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":20458,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:00:32","func_code":"def swap_keys_values(d):\n d2 = {}\n for key in d:\n d2[d[key]] = key\n return d2","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":38686,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:01:40","func_code":"def swap_keys_values(d):\n for key in d:\n d[key] = key\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":5117,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:01:40","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(d.values()):\n new_d[key] = value\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":29731,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:02:19","func_code":"def swap_keys_values(d):\n d2 = {}\n for key in d:\n d2[d[key]] = key\n return d2","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":32780,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:02:19","func_code":"def swap_keys_values(d):\n d2 = {}\n for key in d:\n d2[d[key]] = key\n return d2","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":3594,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:03:29","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n print(list(d.values()))\n for key, value in list(d.items()):\n print(value)\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":10303,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:04:16","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":35367,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:05:48","func_code":"def swap_keys_values(d):\n return {k: v for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":23700,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:06:08","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":23653,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:06:08","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":9979,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:06:11","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n for key in d:\n if d[key] in d2:\n del d2[d[key]]\n else:\n d2[d[key]] = key\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":24481,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:06:11","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n for key in d:\n if d[key] in d2:\n del d2[d[key]]\n else:\n d2[d[key]] = key\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":13510,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-02-24 12:06:11","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n for key in d:\n if d[key] in d2:\n del d2[d[key]]\n else:\n d2[d[key]] = key\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":5407,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:07:31","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if int(value) not in list(d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":18984,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-02-24 12:11:06","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":33199,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-02-24 12:11:06","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":36176,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:14:53","func_code":"def swap_unique_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":7594,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:15:33","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":28327,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-24 12:15:39","func_code":"def swap_keys_values():\n print({v: k for k, v in list(d.items())})","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":39388,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-24 12:16:05","func_code":"def swap_keys_values(k, v):\n print({v: k for k, v in list(d.items())})","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":31124,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:17:27","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) != 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":1977,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:18:05","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) != 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":20948,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:18:17","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":36935,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:18:17","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":39045,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-02-24 12:18:17","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":37271,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:24:24","func_code":"def swap_keys_values(d):\n return {(v, k) for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":2194,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:26:25","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":27085,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:26:25","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":9304,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:31:24","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":37521,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:31:24","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":12972,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 12:34:56","func_code":"def swap_keys_values(d):\n return {v: k for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":4424,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 12:35:21","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":18464,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 12:35:21","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":29580,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-24 12:35:37","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":22467,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-24 12:35:37","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":36217,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-02-24 12:35:39","func_code":"def swap_unique_keys_values(d):\n lst = [x for x in list(d.values())]\n new_dict = {v: k for k, v in list(d.items()) if lst.count(v) == 1}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":4538,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-02-24 12:35:39","func_code":"def swap_unique_keys_values(d):\n lst = [x for x in list(d.values())]\n new_dict = {v: k for k, v in list(d.items()) if lst.count(v) == 1}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":15010,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-02-24 12:35:39","func_code":"def swap_unique_keys_values(d):\n lst = [x for x in list(d.values())]\n new_dict = {v: k for k, v in list(d.items()) if lst.count(v) == 1}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":30709,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:36:49","func_code":"def swap_keys_values(d):\n return {v: k for k, v in d}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":1925,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:37:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in d}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":30511,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:38:15","func_code":"def swap_unique_keys_values(d):\n store = {}\n for key in d:\n for k in d:\n if d[key] == d[k]:\n 0\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":18140,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:38:32","func_code":"def swap_unique_keys_values(d):\n store = {}\n for key in d:\n for k in d:\n if d[key] == d[k]:\n continue\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":28117,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:38:58","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if d[key] == di[k]:\n continue\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":1171,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:39:10","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":35025,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:39:10","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":1864,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:39:46","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d[0:-1]:\n for k in di[1:]:\n if d[key] == di[k]:\n continue\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":14086,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:40:05","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d[0:len(d) - 1]:\n for k in di[1:]:\n if d[key] == di[k]:\n continue\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":21186,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:40:16","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if d[key] == di[k]:\n continue\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":38879,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:40:26","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if d.values.count(k) > 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37022,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:40:36","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if d.values.count(k) > 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":39869,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:40:43","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if d[key] == di[k]:\n 0\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8329,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2017-02-24 12:40:46","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":12147,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2017-02-24 12:40:46","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":35395,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:41:07","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if di[k] == d[key]:\n 0\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":38431,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:41:35","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if di[k] == d[key]:\n 0\n else:\n store[k] = d[k]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8284,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:41:42","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(k) > 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":33923,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:43:14","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if di[k] == d[key]:\n break\n else:\n store[key] = d[key]\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":41936,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 12:43:55","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":7304,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:46:03","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(k) > 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":6803,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:46:41","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":34347,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:47:11","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(k) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":25566,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2017-02-24 12:47:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(my_dict.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":10434,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2017-02-24 12:47:43","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":17696,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2017-02-24 12:47:43","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":19078,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:47:48","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":35064,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:47:48","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":33221,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-02-24 12:47:48","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":41127,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-24 12:48:09","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.values())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":6378,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-02-24 12:48:35","func_code":"def swap_keys_values(dictionary):\n dictionary = {v: k for k, v in list(dictionary.items())}\n return dictionary","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":40492,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-02-24 12:48:35","func_code":"def swap_keys_values(dictionary):\n dictionary = {v: k for k, v in list(dictionary.items())}\n return dictionary","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":19021,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:49:13","func_code":"def swap_unique_keys_values(d):\n store = {}\n for k, v in list(d.items()):\n if d.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":15352,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-24 12:49:56","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":9680,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:50:15","func_code":"def swap_unique_keys_values(d):\n store = {}\n for k, v in list(d.items()):\n print(d.count(v))\n if d.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":1881,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:51:00","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(list(d.values()).count\n (k) >= 1)}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":6271,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-24 12:51:49","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n print(sorted(new_dict.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":20345,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-24 12:51:55","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":23373,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-24 12:51:55","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":16267,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-24 12:51:55","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32922,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:52:08","func_code":"def swap_unique_keys_values(d):\n store = {}\n print(list(d.values()))\n for k, v in list(d.items()):\n print(d.count(v))\n if d.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":40162,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:53:07","func_code":"def swap_unique_keys_values(d):\n store = {}\n for k, v in list(d.items()):\n if d.count(d.values) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":6554,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:53:23","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(list(d.values()).count\n (v) == 1)}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":7105,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:53:48","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":33520,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:53:48","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8270,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-24 12:53:48","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":92,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:53:59","func_code":"def swap_unique_keys_values(d):\n store = {}\n for k, v in list(d.items()):\n if d.values.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":2098,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2017-02-24 12:54:04","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":25676,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2017-02-24 12:54:04","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":40364,"user":"573bd795-e55d-4f35-83cb-b4c309fb0d57","date":"2017-02-24 12:54:04","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":39090,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:54:15","func_code":"def swap_unique_keys_values(d):\n store = {}\n for k, v in list(d.items()):\n if list(d.values()).count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":10866,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-24 12:55:00","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":26170,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-24 12:55:00","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":28481,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-24 12:55:00","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":14350,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:55:04","func_code":"def swap_unique_keys_values(d):\n store = {}\n va = list(d.values())\n print(va)\n for k, v in list(d.items()):\n if va.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":24238,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:55:44","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":35644,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:55:44","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":38315,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-02-24 12:55:44","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":33848,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:56:08","func_code":"def swap_unique_keys_values(d):\n store = {}\n val = []\n va = list(d.values())\n for i in va:\n val = va.append(i)\n for k, v in list(d.items()):\n if va.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":28525,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:56:35","func_code":"def swap_unique_keys_values(d):\n store = {}\n val = []\n va = list(d.values())\n for i in va:\n val.append(i)\n for k, v in list(d.items()):\n if va.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":21708,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:56:47","func_code":"def swap_unique_keys_values(d):\n store = {}\n val = []\n va = list(d.values())\n for i in va:\n val.append(i)\n print(val)\n for k, v in list(d.items()):\n if va.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":26580,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:56:57","func_code":"def swap_unique_keys_values(d):\n store = {}\n val = []\n va = list(d.values())\n for i in va:\n val.append(i)\n print(val)\n for k, v in list(d.items()):\n if val.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":16687,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:57:08","func_code":"def swap_unique_keys_values(d):\n store = {}\n val = []\n va = list(d.values())\n for i in va:\n val.append(i)\n for k, v in list(d.items()):\n if val.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":39435,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-02-24 12:57:08","func_code":"def swap_unique_keys_values(d):\n store = {}\n val = []\n va = list(d.values())\n for i in va:\n val.append(i)\n for k, v in list(d.items()):\n if val.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":40824,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-02-24 12:58:08","func_code":"def swap_unique_keys_values(d):\n for pairs in zip(list(d.values()), list(d.items())):\n print(pairs)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":6988,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-02-24 13:06:53","func_code":"def unique(data):\n previous = []\n new = []\n for integer in data:\n if integer not in new and integer not in previous:\n new.append(integer)\n elif integer not in new and integer in previous:\n continue\n elif integer in new and integer not in previous:\n previous.append(integer)\n new.remove(integer)\n return new\n\n\ndef swap_unique_keys_values(d):\n values = [n for n in list(d.values())]\n special = unique(values)\n return {v: k for k, v in list(d.items()) if v in special}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":20490,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-02-24 13:06:53","func_code":"def unique(data):\n previous = []\n new = []\n for integer in data:\n if integer not in new and integer not in previous:\n new.append(integer)\n elif integer not in new and integer in previous:\n continue\n elif integer in new and integer not in previous:\n previous.append(integer)\n new.remove(integer)\n return new\n\n\ndef swap_unique_keys_values(d):\n values = [n for n in list(d.values())]\n special = unique(values)\n return {v: k for k, v in list(d.items()) if v in special}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":474,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-02-24 13:06:53","func_code":"def unique(data):\n previous = []\n new = []\n for integer in data:\n if integer not in new and integer not in previous:\n new.append(integer)\n elif integer not in new and integer in previous:\n continue\n elif integer in new and integer not in previous:\n previous.append(integer)\n new.remove(integer)\n return new\n\n\ndef swap_unique_keys_values(d):\n values = [n for n in list(d.values())]\n special = unique(values)\n return {v: k for k, v in list(d.items()) if v in special}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":20124,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2017-02-24 13:15:38","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k, v in list(d.items()):\n if not v in new_d:\n new_d[v] = k\n else:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":28476,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2017-02-24 13:15:38","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k, v in list(d.items()):\n if not v in new_d:\n new_d[v] = k\n else:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":29278,"user":"ccb230ef-8610-4130-8882-d0643817d9b4","date":"2017-02-24 13:15:38","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k, v in list(d.items()):\n if not v in new_d:\n new_d[v] = k\n else:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":19895,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-24 13:17:56","func_code":"def swap_keys_values(k, v):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":15048,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-24 13:18:28","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":31202,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-24 13:18:28","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":16835,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-24 13:18:28","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":39523,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-02-24 13:19:17","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":10249,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-02-24 13:19:17","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":100,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-02-24 13:19:17","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":17815,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-02-24 13:24:40","func_code":"def swap_keys_values(d):\n my_dict = d\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":8364,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-02-24 13:24:40","func_code":"def swap_keys_values(d):\n my_dict = d\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":16122,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-02-24 13:24:40","func_code":"def swap_keys_values(d):\n my_dict = d\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":27368,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:09:09","func_code":"def swap_keys_values(dict):\n return {v: k for k, v in list(dict.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":8400,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:09:09","func_code":"def swap_keys_values(dict):\n return {v: k for k, v in list(dict.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":20137,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:09:40","func_code":"def swap_unique_keys_values(dict):\n return {v: k for k, v in list(dict.items()) if dict.values.count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37778,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:09:56","func_code":"def swap_unique_keys_values(dict):\n return {v: k for k, v in list(dict.items()) if list(dict.values()).\n count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":17057,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:10:11","func_code":"def swap_unique_keys_values(dict):\n return {v: k for k, v in list(dict.items()) if list(dict.values()).\n count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":31718,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:10:11","func_code":"def swap_unique_keys_values(dict):\n return {v: k for k, v in list(dict.items()) if list(dict.values()).\n count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":18378,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-02-24 14:10:11","func_code":"def swap_unique_keys_values(dict):\n return {v: k for k, v in list(dict.items()) if list(dict.values()).\n count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":16008,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-02-24 14:34:43","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":41753,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-02-24 14:34:43","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":36856,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-02-24 14:34:43","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":26833,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:32:25","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n values = list(d.values())\n for k, v in list(d.items()):\n if values.count(v) == 1:\n d2[v] = k\n print(d2)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":7978,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:38:41","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n values = list(d.values())\n d2 = [(v, k) for k, v in list(d.items()) if values.count(v) == 1]\n print(d2)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":29182,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:39:16","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n values = list(d.values())\n d2 = [(v, k) for k, v in sorted(d.items()) if values.count(v) == 1]\n print(d2)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":30386,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:39:50","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n values = list(d.values())\n d2 = [(v, k) for k, v in list(sorted(d).items()) if values.count(v) == 1]\n print(d2)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":30006,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:40:45","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n values = list(d.values())\n print(sorted(d.items()))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":21750,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:41:37","func_code":"def swap_unique_keys_values(d):\n d2 = {}\n values = list(d.values())\n sort = sorted(d.items())\n d2 = [(v, k) for k, v in sort if values.count(v) == 1]\n print(d2)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":17074,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:52:31","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n l = [(k, v) for k, v in list(d.items()) if values.count(v) == 1]\n print(sorted(l))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":15103,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:52:56","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n l = [(v, k) for k, v in list(d.items()) if values.count(v) == 1]\n print(sorted(l))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32247,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 15:53:48","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n l = [(k, v) for k, v in list(d.items()) if values.count(v) == 1]\n print(sorted(l))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":27167,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:02:43","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = list(d.items())\n l = [(v, k) for k, v in items if values.count(v) == 1]\n print(sorted(l))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8905,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:04:05","func_code":"def swap_unique_keys_values(d):\n print(d)\n values = list(d.values())\n items = list(d.items())\n l = [(v, k) for k, v in items if values.count(v) == 1]\n print(sorted(l))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":11006,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:04:26","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = list(d.items())\n l = [(v, k) for k, v in items if values.count(v) == 1]\n print(sorted(l))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8384,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:04:44","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = list(d.items())\n l = [(v, k) for k, v in items if values.count(v) == 1]\n return sorted(l)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37086,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:05:33","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = list(d.items())\n l = {v: k for k, v in items if values.count(v) == 1}\n return sorted(l)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":41827,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:06:54","func_code":"def swap_unique_keys_values(d):\n print(d)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":38319,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:07:36","func_code":"def swap_unique_keys_values(d):\n print(d)\n print(list(d.values()))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":17325,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:08:15","func_code":"def swap_unique_keys_values(d):\n print(d)\n values = list(d.values())\n print(sorted(d.items()))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":20370,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:08:33","func_code":"def swap_unique_keys_values(d):\n print(d)\n values = list(d.values())\n print(list(d.items()))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":17425,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:18:08","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for k, v in sorted(items)}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":35355,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:18:23","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {k: v for k, v in sorted(items)}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":42168,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:19:05","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":40603,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:19:05","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":28331,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-02-24 16:19:05","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":3986,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:08:19","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":18597,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:08:19","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":22806,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:26:33","func_code":"def swap_unique_keys_values(d):\n for w in list(d.keys()):\n if list(d.keys()).count(w) > 1:\n d.popitem(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":22648,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:27:48","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":19112,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:30:05","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n m = w\n d.popitem(d[w])\n d.popitem(d[m])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":22906,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:32:55","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n m = w\n d.popitem(d[w])\n d.popitem(d[m])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":21523,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:33:19","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n m = ''\n if list(d.items()).count(w) > 1:\n m = w\n d.popitem(d[w])\n d.popitem(d[m])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":623,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:34:39","func_code":"def swap_unique_keys_values(d):\n print(lies(list(d.items())))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":34793,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:34:54","func_code":"def swap_unique_keys_values(d):\n print(list(d.items()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":31535,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:36:01","func_code":"def swap_unique_keys_values(d):\n print(list(d.keys()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":39450,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:36:30","func_code":"def swap_unique_keys_values(d):\n print(list(d.keys()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":5699,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:36:54","func_code":"def swap_unique_keys_values(d):\n print(list(d.items()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":31813,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:37:23","func_code":"def swap_unique_keys_values(d):\n print(list(d.items()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":14534,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:40:03","func_code":"def swap_unique_keys_values(d):\n print(list(d.items()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n for s in list(d.items()):\n if d[s] == d[w]:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8752,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:40:26","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n for s in list(d.items()):\n if d[s] == d[w]:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":7688,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:41:06","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n for s in list(d.items()):\n if d[s] == d[w]:\n d.popitem(d[s])\n d.popitem(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":13758,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:48:21","func_code":"def swap_unique_keys_values(d):\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n for s in list(d.items()):\n if d[s] == w:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37771,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:49:56","func_code":"def swap_unique_keys_values(d):\n print(list(d.items()))\n for w in list(d.items()):\n if list(d.items()).count(w) > 1:\n d.popitem(d[w])\n for s in list(d.items()):\n if d[s] == w:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":11677,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 17:57:39","func_code":"def swap_unique_keys_values(d):\n items = list(d.items())\n for w in items:\n if items.count(w) > 1:\n d.popitem(d[w])\n for s in items:\n if d[s] == w:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":4580,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 18:02:38","func_code":"def swap_unique_keys_values(d):\n items = list(d.items())\n for w in items:\n if items.count(w) > 1:\n d.popitem(d[w])\n for s in items:\n if s == w:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":38344,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 18:02:38","func_code":"def swap_unique_keys_values(d):\n items = list(d.items())\n for w in items:\n if items.count(w) > 1:\n d.popitem(d[w])\n for s in items:\n if s == w:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":6017,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-24 18:02:38","func_code":"def swap_unique_keys_values(d):\n items = list(d.items())\n for w in items:\n if items.count(w) > 1:\n d.popitem(d[w])\n for s in items:\n if s == w:\n d.popitem(d[s])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":18656,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:01:38","func_code":"def swap_keys_values(dict):\n new_dict = {v: k for k, v in list(dict.items())}\n print(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":28762,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:02:14","func_code":"def swap_keys_values(dict):\n new_dict = {v: k for k, v in list(dict.items())}\n print(list(new_dict.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":13309,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:05:17","func_code":"def swap_keys_values(dict):\n new_dict = {v: k for k, v in list(dict.items())}\n print([new_dict])","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":2754,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:13:41","func_code":"def swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n print([new_dict])\n for k in new_dict:\n l.append('({} : {})'.format(k, new_dict[k]))\n print(l)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":1002,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:21:05","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({} : {})'.format(k, new_dict[k]))\n print(sorted(l, key=my_function))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":13654,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:24:43","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({} : {})'.format(k, new_dict[k]))\n print('[' + ', '.join(sorted(l, key=my_function)) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":10524,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:29:51","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({} : {})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')\n print(type(l[1]))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":8418,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:30:08","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({} : {})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":41094,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:30:25","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({}, : {})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":40713,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:30:41","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({}, {})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":34949,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:30:54","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({}, {})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":18971,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:31:24","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({}, {:2s})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":9675,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:31:40","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({}, {:>2s})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":32640,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:32:01","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append('({}, {:>2s})'.format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":5011,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:32:41","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append(\"({}, '{:>2s}')\".format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":28278,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:32:56","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append(\"({}, '{}')\".format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":1339,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:33:10","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append(\"({}, '{}')\".format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-3))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":30369,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:34:18","func_code":"def my_function(a):\n return a[1]\n\n\ndef swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n\n def my_function(a):\n return a[1]\n for k in new_dict:\n l.append(\"({}, '{}')\".format(int(k), new_dict[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-3))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":16438,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 19:47:20","func_code":"def swap_keys_values(dict):\n l = []\n new_dict = {v: k for k, v in list(dict.items())}\n new_dict1 = new_dict.copy()\n for k in new_dict1:\n l.append(\"({}, '{}')\".format(int(k), new_dict1[k]))\n print('[' + ', '.join(sorted(l, key=itemgetter(-3))) + ']')","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":8377,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 20:44:13","func_code":"def swap_keys_values(a):\n l = []\n new_dict = {v: k for k, v in list(a.items())}\n return sorted(new_dict.items())","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":16994,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:05:49","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n return sorted(new_dict.items())","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":22286,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:10:36","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n pprint(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":14165,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:16:12","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n pprint(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":36616,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:17:23","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n pprint(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":38570,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:17:59","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n print(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":6832,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:19:28","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n print(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":6536,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:20:00","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n return sorted(new_dict.items())\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":5464,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:25:22","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n print(type(sorted(new_dict.items())))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":11981,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:45:22","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n pprint(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":18178,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:45:22","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n pprint(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":19805,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-24 21:45:22","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n pprint(sorted(new_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":30482,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 08:57:43","func_code":"def swap_keys_values(d):\n new_d = {}\n for key in d:\n new_d[d[key]] = key\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":18854,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 08:57:43","func_code":"def swap_keys_values(d):\n new_d = {}\n for key in d:\n new_d[d[key]] = key\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":26062,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 09:05:29","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key in d:\n if list(d.values()).count(d[key]) == 1:\n new_d[d[key]] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":5048,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 09:07:44","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = []\n for key in d:\n for value in list(d.values()):\n a.append(value)\n if a.count(d[key]) == 1:\n new_d[d[key]] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":3431,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 09:13:01","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = []\n for value in list(d.values()):\n a.append(value)\n for key in d:\n if a.count(d[key]) == 1:\n new_d[d[key]] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":36126,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 09:13:01","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = []\n for value in list(d.values()):\n a.append(value)\n for key in d:\n if a.count(d[key]) == 1:\n new_d[d[key]] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":42331,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-02-25 09:13:01","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = []\n for value in list(d.values()):\n a.append(value)\n for key in d:\n if a.count(d[key]) == 1:\n new_d[d[key]] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":25614,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-02-25 12:15:49","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":23826,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-02-25 12:15:49","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":3387,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-02-25 12:15:49","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":24662,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:07:18","func_code":"def swap_unique_keys_values(d):\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":17554,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:08:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":16089,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:09:26","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.values())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":38461,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:09:45","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":21121,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:10:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if 'a' not in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":40877,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:10:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if 'a' not in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":20489,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-25 14:10:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if 'a' not in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":29130,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-02-25 16:25:51","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":9038,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-02-25 16:25:51","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":11283,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-02-25 16:47:35","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.values()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":16760,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-02-25 16:47:56","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.values()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":10543,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-02-25 16:47:56","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.values()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":31716,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-02-25 16:47:56","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.values()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":18312,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-25 20:09:32","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d\n if __name__ == '__main__':\n main()","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":32715,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-25 20:09:32","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d\n if __name__ == '__main__':\n main()","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":23531,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-25 20:09:32","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d\n if __name__ == '__main__':\n main()","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":14972,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-02-25 21:13:18","func_code":"def swap_keys_values(s):\n for k, v in list(my_dict.items()):\n del my_dict[k]\n my_dict[v] = k\n print(my_dict)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":27255,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-02-26 10:47:09","func_code":"def swap_keys_values(d):\n {v: k for k, v in d.items}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":14682,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:48:32","func_code":"def swap_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":39024,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:48:48","func_code":"def swap_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":28814,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:48:48","func_code":"def swap_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":30056,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:55:20","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n if pair[1] not in new_dict:\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":19804,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:56:51","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n if pair[1] not in new_dict:\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":4239,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:58:18","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n if pair[1] not in new_dict:\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":17591,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:58:18","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n if pair[1] not in new_dict:\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":25983,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-02-26 12:58:18","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for pair in list(d.items()):\n if pair[1] not in new_dict:\n new_dict[pair[1]] = pair[0]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":1642,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:04:51","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(new_d.values()):\n new_d[key] = value\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":5226,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:05:30","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for key, value in list(d.items()):\n if value not in list(new_d.values()):\n new_d[value] = key\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":10623,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:08:18","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n keys = list(set(d.keys()))\n values = list(set(d.values()))\n i = 0\n while i < len(keys):\n new_d[values[i]] = keys[i]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":27773,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:08:34","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n keys = list(set(d.keys()))\n values = list(set(d.values()))\n i = 0\n while i < len(keys):\n new_d[values[i]] = keys[i]\n i = i + 1\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":5191,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:09:06","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n keys = list(set(d.keys()))\n values = list(set(d.values()))\n print((keys, values))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":20446,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:15:53","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = list(set(d.values()) & set(d.values()))\n for k, v in list(d.items()):\n if v not in a:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":25599,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:16:16","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = list(set(d.values()) & set(d.values()))\n print(a)\n for k, v in list(d.items()):\n if v not in a:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":19093,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:18:05","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = list(d.values()) - list(set(d.values))\n print(a)\n for k, v in list(d.items()):\n if v not in a:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":13118,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:19:09","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = list(d.values()) - (list(set(d.values())) - list(d.values()))\n print(a)\n for k, v in list(d.items()):\n if v not in a:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":39564,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:25:46","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = set(d.values()) | set(d.values())\n print(a)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":7509,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:26:23","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = set(d.values()) & set(d.values())\n print(a)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":16406,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:26:58","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = list(d.values()) - list(set(d.values()))\n print(a)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":16169,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:28:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n a = list(d.values()) - set(d.values())\n print(a)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":5128,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:58:37","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":19401,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:59:21","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if [v for v in list(d.values()\n )].count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":1814,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:59:21","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if [v for v in list(d.values()\n )].count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":41191,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-02-26 14:59:21","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if [v for v in list(d.values()\n )].count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":35871,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-02-26 19:11:09","func_code":"def swap_keys_values(d_0):\n d = {}\n for key in d_0:\n d[d_0[key]] = key\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":18847,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-02-26 19:11:09","func_code":"def swap_keys_values(d_0):\n d = {}\n for key in d_0:\n d[d_0[key]] = key\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":26690,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-02-26 19:15:17","func_code":"def swap_unique_keys_values(d_0):\n d = {}\n for key in d_0:\n d[d_0[key]] = key\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":40338,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-02-26 19:18:50","func_code":"def swap_unique_keys_values(d_0):\n d = {}\n for key in d_0:\n if d_0[key] not in d:\n d[d_0[key]] = key\n else:\n del d[d_0[key]]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":12819,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-02-26 19:18:50","func_code":"def swap_unique_keys_values(d_0):\n d = {}\n for key in d_0:\n if d_0[key] not in d:\n d[d_0[key]] = key\n else:\n del d[d_0[key]]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":4287,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-02-26 19:18:50","func_code":"def swap_unique_keys_values(d_0):\n d = {}\n for key in d_0:\n if d_0[key] not in d:\n d[d_0[key]] = key\n else:\n del d[d_0[key]]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":34754,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-02-26 19:23:09","func_code":"def swap_keys_values(d):\n {v: k for k, v in d.items}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":15653,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-02-26 19:23:09","func_code":"def swap_keys_values(d):\n {v: k for k, v in d.items}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":13026,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-02-26 19:23:09","func_code":"def swap_keys_values(d):\n {v: k for k, v in d.items}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":3459,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-26 21:53:33","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":20649,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-26 21:53:33","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":38273,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-26 21:53:33","func_code":"def swap_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":32937,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:21:07","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n print(dict_keys)\n print(dict_values)\n d = {}\n i = 0\n while i < len(dict_keys):\n d[dict_keys[i]] = dict_values[i]\n i = i + 1\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":41774,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:21:31","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n i = 0\n while i < len(dict_keys):\n d[dict_keys[i]] = dict_values[i]\n i = i + 1\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":15330,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:25:07","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n i = 0\n while i < len(dict_keys):\n d[dict_keys[i]] = dict_values[i]\n i = i + 1\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32523,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:25:31","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n i = 0\n while i < len(dict_keys):\n d[dict_keys[i]] = dict_values[i]\n i = i + 1\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":2254,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:26:37","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n for i in range(0, len(dict_keys)):\n d[dict_keys[i]] = dict_values[i]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":1748,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:26:37","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n for i in range(0, len(dict_keys)):\n d[dict_keys[i]] = dict_values[i]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":20250,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-02-26 22:26:37","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n for i in range(0, len(dict_keys)):\n d[dict_keys[i]] = dict_values[i]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":3504,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-26 22:31:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n t = []\n for k, v in list(d.items()):\n if v not in new_d:\n new_d[v] = k\n else:\n t.append(v)\n for v in t:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":11552,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-26 22:31:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n t = []\n for k, v in list(d.items()):\n if v not in new_d:\n new_d[v] = k\n else:\n t.append(v)\n for v in t:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":23690,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-02-26 22:31:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n t = []\n for k, v in list(d.items()):\n if v not in new_d:\n new_d[v] = k\n else:\n t.append(v)\n for v in t:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":21086,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-26 23:02:47","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":42371,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-26 23:38:11","func_code":"def swap_unique_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items()) if list(d.values())\n .count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":9094,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-26 23:39:20","func_code":"def swap_unique_keys_values(d):\n new_dict = print(sorted(dict([(v, k) for k, v in d.items() if list(d.\n values()).count(v) == 1])))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":28249,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-26 23:39:20","func_code":"def swap_unique_keys_values(d):\n new_dict = print(sorted(dict([(v, k) for k, v in d.items() if list(d.\n values()).count(v) == 1])))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8654,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-26 23:39:20","func_code":"def swap_unique_keys_values(d):\n new_dict = print(sorted(dict([(v, k) for k, v in d.items() if list(d.\n values()).count(v) == 1])))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":15836,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-27 09:27:10","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":41724,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:27:37","func_code":"def swap_keys_values(d):\n return {value: key for key, value in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":36795,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:27:37","func_code":"def swap_keys_values(d):\n return {value: key for key, value in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":29475,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:29:33","func_code":"def swap_unique_keys_values(d):\n new_dict = {value: key for key, value in list(d.items()) if value not in\n new_dict}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":31856,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:29:46","func_code":"def swap_unique_keys_values(d):\n new_dict = {value: key for key, value in list(d.items()) if value not in\n new_dict}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":35658,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:30:52","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for key, value in list(d.items()):\n if value not in new_dict:\n new_dict[value] = key\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":18497,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:31:45","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for key, value in list(d.items()):\n if value not in new_dict:\n new_dict[value] = key\n else:\n del new_dict[value]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":29755,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-02-27 09:31:45","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for key, value in list(d.items()):\n if value not in new_dict:\n new_dict[value] = key\n else:\n del new_dict[value]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":7618,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-27 09:38:46","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":14398,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-27 09:38:46","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":24699,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-02-27 09:38:46","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":31352,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-27 12:42:12","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":3984,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-27 12:43:11","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":35917,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-27 12:44:03","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":5657,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:23:28","func_code":"def swap_unique_keys_values(d):\n items = set(d.itmes())\n for w in items:\n if items.count(w) > 1:\n d.pop(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":21397,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:24:06","func_code":"def swap_unique_keys_values(d):\n items = set(d.items())\n for w in items:\n if items.count(w) > 1:\n d.pop(d[w])\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":10709,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-02-27 13:30:07","func_code":"def swap_keys_values(d):\n new_d = dict(list(zip(list(d.values()), list(d.keys()))))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":14484,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-02-27 13:30:07","func_code":"def swap_keys_values(d):\n new_d = dict(list(zip(list(d.values()), list(d.keys()))))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":2177,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-02-27 13:30:07","func_code":"def swap_keys_values(d):\n new_d = dict(list(zip(list(d.values()), list(d.keys()))))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":17439,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:31:19","func_code":"def swap_unique_keys_values(d):\n items = set(d.items())\n for w in items:\n if items.count(w) > 1:\n d.pop(d[w])\n print(items)\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":34423,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:31:40","func_code":"def swap_unique_keys_values(d):\n items = set(d.items())\n print(items)\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":30555,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:31:55","func_code":"def swap_unique_keys_values(d):\n items = set(d.items())\n print(items)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":19349,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:31:55","func_code":"def swap_unique_keys_values(d):\n items = set(d.items())\n print(items)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":33173,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-02-27 13:31:55","func_code":"def swap_unique_keys_values(d):\n items = set(d.items())\n print(items)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":18156,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-27 13:47:00","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":6112,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-27 13:47:00","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":6344,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-27 13:47:00","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":30148,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-27 14:03:24","func_code":"def swap_unique_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n l = []\n for i in a:\n l.append(a[i])\n for i in l:\n if l.count(i) > 1:\n del new_dict[i]\n break\n return new_dict\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":22561,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-27 14:03:51","func_code":"def swap_unique_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n l = []\n for i in a:\n l.append(a[i])\n for i in l:\n if l.count(i) > 1:\n del new_dict[i]\n break\n return new_dict\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":17836,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-27 14:03:51","func_code":"def swap_unique_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n l = []\n for i in a:\n l.append(a[i])\n for i in l:\n if l.count(i) > 1:\n del new_dict[i]\n break\n return new_dict\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":18406,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-02-27 14:03:51","func_code":"def swap_unique_keys_values(a):\n new_dict = {v: k for k, v in list(a.items())}\n l = []\n for i in a:\n l.append(a[i])\n for i in l:\n if l.count(i) > 1:\n del new_dict[i]\n break\n return new_dict\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":28220,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-02-27 14:20:25","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":10459,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-02-27 14:20:25","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":27267,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-02-27 14:21:16","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":6805,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-02-27 14:21:16","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":16312,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 10:12:47","func_code":"def swap_keys_values(d):\n new_d = {}\n for k in d:\n new_d[d[k]] = k\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":25595,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 10:13:06","func_code":"def swap_keys_values(d):\n new_d = {}\n for k in d:\n new_d[d[k]] = k\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":23987,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 10:13:06","func_code":"def swap_keys_values(d):\n new_d = {}\n for k in d:\n new_d[d[k]] = k\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":10714,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-02-28 10:14:26","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":41649,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-02-28 10:14:26","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":8351,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-02-28 10:16:25","func_code":"def swap_unique_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items()) if list(d.values())\n .count(v) == 1])\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":6985,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-02-28 10:16:25","func_code":"def swap_unique_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items()) if list(d.values())\n .count(v) == 1])\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":4465,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 10:19:33","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k in d:\n if d[k] not in new_d:\n new_d[d[k]] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":36894,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 10:20:05","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k in d:\n if d[k] not in new_d:\n new_d[d[k]] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":27507,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-02-28 10:47:34","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":31754,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-02-28 10:47:34","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":30160,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-02-28 10:47:34","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":16540,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-02-28 11:31:20","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n print(sorted(new_dict.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":38689,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-02-28 11:31:20","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n print(sorted(new_dict.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":29085,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-02-28 13:27:26","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":14734,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-02-28 13:28:02","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":22460,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-02-28 13:53:27","func_code":"def swap_keys_values(d):\n d1 = {}\n for k, v in list(d.items()):\n d1[v] = k\n return d1","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":4822,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-02-28 13:53:27","func_code":"def swap_keys_values(d):\n d1 = {}\n for k, v in list(d.items()):\n d1[v] = k\n return d1","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":26302,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 13:55:53","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n values = list(d.values())\n keys = list(d.keys())\n i = 0\n for i in range(0, len(values)):\n if values.count(values[i]) < 2:\n new_d[values[i]] = keys[i]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":4533,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-02-28 13:55:53","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n values = list(d.values())\n keys = list(d.keys())\n i = 0\n for i in range(0, len(values)):\n if values.count(values[i]) < 2:\n new_d[values[i]] = keys[i]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":8868,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-02-28 14:02:29","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n num = []\n let = []\n for k, v in list(d.items()):\n if v not in num and k not in let:\n d1[v] = k\n num.append(v)\n let.append(k)\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":14202,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-02-28 14:03:16","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n num = []\n let = []\n print(d)\n for k, v in list(d.items()):\n if v not in num and k not in let:\n d1[v] = k\n num.append(v)\n let.append(k)\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":2662,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-02-28 14:03:16","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n num = []\n let = []\n print(d)\n for k, v in list(d.items()):\n if v not in num and k not in let:\n d1[v] = k\n num.append(v)\n let.append(k)\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":21567,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-02-28 14:51:38","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if key == k:\n break\n if di[k] == d[key]:\n continue\n else:\n store[key] = d[k]\n return {v: k for v, k in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":36756,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-02-28 14:51:38","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if key == k:\n break\n if di[k] == d[key]:\n continue\n else:\n store[key] = d[k]\n return {v: k for v, k in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32311,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-02-28 14:51:38","func_code":"def swap_unique_keys_values(d):\n store = {}\n di = d\n for key in d:\n for k in di:\n if key == k:\n break\n if di[k] == d[key]:\n continue\n else:\n store[key] = d[k]\n return {v: k for v, k in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":39154,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-02-28 15:48:58","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":12496,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-02-28 15:48:58","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":2820,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:04:21","func_code":"def swap_keys_values():\n return {v: k for k, v in d.items}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":15801,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:05:01","func_code":"def swap_keys_values():\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":14686,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:07:36","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":7225,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:07:36","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":6665,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:08:31","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.items()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":36881,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:09:05","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.values()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":37885,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-02-28 16:09:05","func_code":"def swap_unique_keys_values(d):\n l = []\n m = []\n for v in list(d.values()):\n if v in l:\n m.append(v)\n else:\n l.append(v)\n return {v: k for k, v in list(d.items()) if v not in m}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":20534,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-28 16:50:03","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":14551,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-28 16:51:10","func_code":"def swap_keys_values(my_dict):\n d = {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":9277,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-28 16:51:33","func_code":"def swap_keys_values(my_dict):\n my_dict = {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":34017,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-28 16:51:50","func_code":"def swap_keys_values(my_dict):\n my_dict = {v: k for k, v in list(my_dict.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":25600,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-28 16:51:50","func_code":"def swap_keys_values(my_dict):\n my_dict = {v: k for k, v in list(my_dict.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":23336,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-02-28 16:51:50","func_code":"def swap_keys_values(my_dict):\n my_dict = {v: k for k, v in list(my_dict.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":8309,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-28 17:11:05","func_code":"def swap_unique_keys_values(d):\n new_dict = print(sorted(dict([(v, k) for k, v in d.items() if list(d.\n values()).count(v) == 1])))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":13626,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-02-28 17:11:05","func_code":"def swap_unique_keys_values(d):\n new_dict = print(sorted(dict([(v, k) for k, v in d.items() if list(d.\n values()).count(v) == 1])))","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":16299,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-02-28 18:46:09","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n print(swapped_d)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":16172,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 21:13:08","func_code":"def swap_keys_values(d):\n m = {}\n for i in list(d.items()):\n m[i[1]] = i[0]\n return m","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":22154,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 21:13:08","func_code":"def swap_keys_values(d):\n m = {}\n for i in list(d.items()):\n m[i[1]] = i[0]\n return m","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":13577,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 21:24:52","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if i[1] not in m:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":38305,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-02-28 21:33:14","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":20085,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-02-28 21:33:14","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":15562,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 21:49:37","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if i[1].count(d) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":28543,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 21:57:26","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if list(d.values()).count(i[1]) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":32001,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 22:00:41","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if d.count(i[1]) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":24820,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 22:00:41","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if d.count(i[1]) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32226,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-02-28 22:00:41","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if d.count(i[1]) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37683,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-02-28 23:17:58","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n print(list(swapped_d.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":10150,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-02-28 23:20:07","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n return swapped_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":11409,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-02-28 23:20:07","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n return swapped_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":5790,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-02-28 23:20:07","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n return swapped_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":6414,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2017-03-01 01:03:11","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":14315,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2017-03-01 01:03:59","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":23765,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2017-03-01 01:03:59","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":4188,"user":"e8eb24cb-1a57-439b-8705-aed3cec25793","date":"2017-03-01 01:03:59","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":5024,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-01 11:48:58","func_code":"def swap_keys_values(x):\n for a in d:\n e[d[value]] = e[d[key]]","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":29111,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-01 12:27:00","func_code":"def swap_keys_values(x):\n for a in d:\n e[d[value]] = e[d[key]]\n return e","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":6053,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 12:32:09","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":21464,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 12:38:59","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":40463,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 12:40:41","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":16815,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 12:41:22","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":5056,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 12:41:22","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":29807,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-01 12:42:51","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.avlues()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":24276,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-01 12:43:08","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":20139,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-01 12:43:08","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":10584,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-01 12:43:08","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":18286,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:50:37","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([v])\n del out_dict[v]\n elif v not in blacklist:\n out_dict[v] = k","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":3997,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:51:26","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([v])\n del out_dict[v]\n elif v not in blacklist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":42182,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:51:53","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([v])\n del out_dict[v]\n elif t not in blacklist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":30467,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:52:21","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([v])\n del out_dict[v]\n elif t not in blist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":21192,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:52:36","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([t])\n del out_dict[t]\n elif t not in blist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":7627,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:52:53","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([t])\n del out_dict[t]\n elif t not in blist:\n out_dict[t] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":41252,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:52:53","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([t])\n del out_dict[t]\n elif t not in blist:\n out_dict[t] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":13012,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-01 12:52:53","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blist = set()\n for k, t in list(in_dict.items()):\n if t in out_dict:\n blist.update([t])\n del out_dict[t]\n elif t not in blist:\n out_dict[t] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":41173,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:10:59","func_code":"def swap_unique_keys_values(dick):\n newdick = {}\n for k, v in list(dick.items()):\n if v not in newdick:\n newdick[v] = k\n return newdick","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":7230,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:13:18","func_code":"def swap_unique_keys_values(dick):\n newdick = {}\n for k, v in list(dick.items()):\n if v not in newdick:\n newdick[v] = k\n return newdick","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":15494,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:16:07","func_code":"def swap_unique_keys_values(dick):\n newdick = {}\n for k, v in list(dick.items()):\n if list(dick.values()).count(v) == 1:\n newdick[v] = k\n return newdick","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":26643,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:17:58","func_code":"def swap_unique_keys_values(dick):\n newdick = {}\n for k, v in list(dick.items()):\n if [v for v in list(dick.values())].count(v) == 1:\n newdick[v] = k\n return newdick","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":37376,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:17:58","func_code":"def swap_unique_keys_values(dick):\n newdick = {}\n for k, v in list(dick.items()):\n if [v for v in list(dick.values())].count(v) == 1:\n newdick[v] = k\n return newdick","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":23328,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:23:33","func_code":"def swap_keys_values():\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":21265,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:23:55","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":14681,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:23:55","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":37877,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-01 13:23:55","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":8835,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-01 13:56:11","func_code":"def swap_keys_values(d):\n d = {'cat': 2, 'dog': 7, 'horse': 9, 'whale': 14}\n for key, value in d:\n {value: key for key, value in list(d.items())}\n print(swap_keys_values(d))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":25978,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-01 13:56:11","func_code":"def swap_keys_values(d):\n d = {'cat': 2, 'dog': 7, 'horse': 9, 'whale': 14}\n for key, value in d:\n {value: key for key, value in list(d.items())}\n print(swap_keys_values(d))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":39382,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-01 13:56:11","func_code":"def swap_keys_values(d):\n d = {'cat': 2, 'dog': 7, 'horse': 9, 'whale': 14}\n for key, value in d:\n {value: key for key, value in list(d.items())}\n print(swap_keys_values(d))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":11085,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-01 14:38:57","func_code":"def swap_keys_values(d):\n reverse = {}\n for k, v in list(d.items()):\n reverse[v] = k\n return reverse","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":34742,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-01 14:38:57","func_code":"def swap_keys_values(d):\n reverse = {}\n for k, v in list(d.items()):\n reverse[v] = k\n return reverse","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":29373,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-01 14:38:57","func_code":"def swap_keys_values(d):\n reverse = {}\n for k, v in list(d.items()):\n reverse[v] = k\n return reverse","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":8580,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 14:47:47","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":11392,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 14:48:56","func_code":"def swap_unique_keys_values(d):\n a, b = [v for k, v in list(d.items())], [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":4402,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 14:49:51","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":6637,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-01 14:49:51","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":32812,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-01 15:05:32","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if list(d.values()).count(i[1]) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":41014,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-01 15:05:32","func_code":"def swap_unique_keys_values(d):\n m = {}\n for i in list(d.items()):\n if list(d.values()).count(i[1]) == 1:\n m[i[1]] = i[0]\n return m","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":22779,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 16:17:01","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for k, v in list(in_dict.items()):\n out_dict[v] = k\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":39415,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:05:14","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n list = set()\n for k, v in in_dict.items:\n if v in out_dict():\n list.append([v])\n del out_dict[v]\n elif v not in list:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":11746,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:05:50","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n list = set()\n for k, v in in_dict.items:\n if v in out_dict():\n list.update([v])\n del out_dict[v]\n elif v not in list:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":18413,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:08:59","func_code":"def swap_unique_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items()) if list(d.values())\n .count(v) == 1])\n print(new_dict)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":16282,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:34:29","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":32420,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:34:29","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":8900,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 17:45:59","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":2624,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 17:46:42","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":19894,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 17:46:42","func_code":"def swap_keys_values(d):\n new_dict = {v: k for k, v in list(d.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":14989,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:47:04","func_code":"def swap_keys_values(d):\n return dict([(v, k) for k, v in list(d.items())])","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":1042,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:47:55","func_code":"def swap_keys_values(d):\n return dict([(v, k) for k, v in list(d.items())])","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":27506,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-01 17:47:55","func_code":"def swap_keys_values(d):\n return dict([(v, k) for k, v in list(d.items())])","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":28611,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:36:46","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n for k, v in list(d.items()):\n if d.count(v) < 2:\n tempd = {k: v}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":28715,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:46:25","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n for k, v in list(d.items()):\n if v.count(v) < 2:\n tempd = {k: v}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":24892,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:48:04","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n for k, v in list(d.items()):\n if v.count(str(v)) < 2:\n tempd = {k: v}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":11468,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:51:53","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n tempd = {k: v for k, v in list(d.items()) if v.count(v) < 2}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":3915,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:52:40","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n tempd = {k: v for k, v in list(d.items()) if str(v).count(v) < 2}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":31653,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:53:02","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n tempd = {k: v for k, v in list(d.items()) if list(v).count(v) < 2}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":31179,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:53:02","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n tempd = {k: v for k, v in list(d.items()) if list(v).count(v) < 2}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37954,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-01 18:53:02","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n tempd = {k: v for k, v in list(d.items()) if list(v).count(v) < 2}\n new_dict = {v: k for k, v in list(tempd.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32713,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-02 09:26:30","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":28560,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-02 09:26:30","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":27842,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-02 09:29:13","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":42029,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-02 09:29:13","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":24847,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-02 09:32:09","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n for i in range(0, len(dict_keys)):\n d[dict_keys[i]] = dict_values[i]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":19522,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-02 09:32:09","func_code":"def swap_unique_keys_values(d):\n keys = []\n values = []\n dict_keys = []\n dict_values = []\n dump = []\n for k, v in list(d.items()):\n keys.append(k)\n values.append(v)\n for num in values:\n test = num\n values = values[1:]\n if test in values:\n dump.append(test)\n elif test not in values and test not in dump:\n dict_keys.append(test)\n dict_values.append(keys[0])\n keys = keys[1:]\n d = {}\n for i in range(0, len(dict_keys)):\n d[dict_keys[i]] = dict_values[i]\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":10763,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-02 10:31:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":18732,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-02 10:31:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":2113,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-02 10:31:20","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":2137,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-02 11:54:54","func_code":"def swap_keys_values(d):\n n_d = {}\n for k in d:\n n_d[d[k]] = k\n return n_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":41629,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-02 11:54:54","func_code":"def swap_keys_values(d):\n n_d = {}\n for k in d:\n n_d[d[k]] = k\n return n_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":5820,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-02 11:54:54","func_code":"def swap_keys_values(d):\n n_d = {}\n for k in d:\n n_d[d[k]] = k\n return n_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":24775,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 13:23:47","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":41990,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 13:23:47","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":9836,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:24:14","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":30491,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:24:14","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":1524,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-02 13:36:34","func_code":"def swap_keys_values(my_dict):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":19309,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-02 13:37:03","func_code":"def swap_keys_values(my_dict):\n new_dict = dict((v, k) for k, v in list(my_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":38182,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-02 13:37:03","func_code":"def swap_keys_values(my_dict):\n new_dict = dict((v, k) for k, v in list(my_dict.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":32876,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-02 13:42:14","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":4711,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-02 13:42:14","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":11307,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-02 13:42:14","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":5721,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:46:07","func_code":"def swap_keys_values(d):\n new = {}\n for z, q in list(d.items()):\n new[q] = z\n return list(new.items())","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":2419,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-02 13:46:39","func_code":"def swap_unique_keys_values(my_dict):\n d = {}\n for key in my_dict:\n value = my_dict.get(k)\n if value in d:\n del d[v]\n else:\n d[v] = k\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32161,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:46:44","func_code":"def swap_unique_keys_values(d):\n return set({v: k for k, v in list(d.items())})","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":13268,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:47:22","func_code":"def swap_keys_values(d):\n new = {}\n for z, q in list(d.items()):\n new[q] = z\n return list(new.items())","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":21209,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-02 13:47:24","func_code":"def swap_unique_keys_values(my_dict):\n d = {}\n for key in my_dict:\n value = my_dict.get(key)\n if value in d:\n del d[value]\n else:\n d[value] = key\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":6835,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-02 13:47:24","func_code":"def swap_unique_keys_values(my_dict):\n d = {}\n for key in my_dict:\n value = my_dict.get(key)\n if value in d:\n del d[value]\n else:\n d[value] = key\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":14170,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:48:31","func_code":"def swap_keys_values(d):\n new = {}\n for z, q in list(d.items()):\n new[q] = z\n return list(new.items())","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":10792,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:49:03","func_code":"def swap_keys_values(d):\n new = {}\n for z, q in list(d.items()):\n new[q] = z\n return list(new.items())","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":14187,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:49:47","func_code":"def swap_keys_values(d):\n new_dict = {}\n for z, q in list(d.items()):\n new[q] = z\n return list(new_dict.items())","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":31362,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:50:14","func_code":"def swap_keys_values(d):\n new_dict = {}\n for z, q in list(d.items()):\n new_dict[q] = z\n return list(new_dict.items())","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":7506,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:50:49","func_code":"def swap_keys_values(d):\n new_dict = {}\n for z, q in list(d.items()):\n new_dict[q] = z\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":26895,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 13:50:49","func_code":"def swap_keys_values(d):\n new_dict = {}\n for z, q in list(d.items()):\n new_dict[q] = z\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":38907,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:52:06","func_code":"def swap_unique_keys_values(d):\n return set({v: k for k, v in d})","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":3165,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:53:27","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in set(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":40758,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:56:15","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in set(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":40763,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 13:56:16","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":20894,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-02 13:56:55","func_code":"def swap_keys_values(d):\n return {v: k for k, in v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":7529,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-02 13:57:42","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":36400,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-02 13:57:42","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":22857,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:58:07","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in set(d.items()) if v not in set.intersection(\n list(d.items()))}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":14632,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 13:58:34","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":4070,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 13:58:57","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in set.intersection(list(d.items()))}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":13945,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 13:59:24","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":3394,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 14:03:18","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":27934,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 14:03:36","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v not in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":4656,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 14:04:23","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v in list(d.keys())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":26942,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 14:04:43","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if (k, v) not in set.\n intersection(list(d.items()))}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":989,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 14:07:05","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":2138,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 14:07:05","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":14691,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-02 14:07:05","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":21943,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 14:07:41","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(list(d.values()).count\n (v) == 1)}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37412,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 14:08:27","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":12380,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-02 14:08:27","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":27662,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-03-02 14:18:24","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":30906,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-03-02 14:18:24","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":33289,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-03-02 14:18:38","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":38605,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-03-02 14:18:38","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":11776,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-03-02 14:19:33","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":157,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-03-02 14:19:33","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":4459,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 14:21:17","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n seen = []\n for z, q in list(d.items()):\n if q not in seen:\n new_dict[q] = z\n seen.append(q)\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":36424,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-02 14:21:17","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n seen = []\n for z, q in list(d.items()):\n if q not in seen:\n new_dict[q] = z\n seen.append(q)\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":13917,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-03-02 14:21:58","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k, v in list(d.items()):\n if not v in new_d:\n new_d[v] = k\n else:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":16818,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-03-02 14:21:58","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k, v in list(d.items()):\n if not v in new_d:\n new_d[v] = k\n else:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":25362,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-03-02 14:21:58","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k, v in list(d.items()):\n if not v in new_d:\n new_d[v] = k\n else:\n del new_d[v]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":4634,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-02 14:22:10","func_code":"def swap_keys_values(x):\n new = {v: k for k, v in list(x.items())}\n return new","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":20558,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-02 14:22:10","func_code":"def swap_keys_values(x):\n new = {v: k for k, v in list(x.items())}\n return new","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":1563,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-02 14:37:47","func_code":"def swap_unique_keys_values(x):\n new = {}\n for k in x:\n c = x.get(k)\n if c in new:\n del new[v]\n else:\n new[v] = k\n return new","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8657,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-02 14:38:14","func_code":"def swap_unique_keys_values(x):\n new = {}\n for k in x:\n c = x.get(k)\n if c in new:\n del new[c]\n else:\n new[c] = k\n return new","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":1755,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-02 14:38:14","func_code":"def swap_unique_keys_values(x):\n new = {}\n for k in x:\n c = x.get(k)\n if c in new:\n del new[c]\n else:\n new[c] = k\n return new","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":6314,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-02 15:48:10","func_code":"def swap_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":33733,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-02 15:48:10","func_code":"def swap_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":27202,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-02 16:00:39","func_code":"def swap_unique_keys_values(d):\n seen = {}\n result = {}\n for k, v in d.items():\n if v in seen:\n del seen[v]\n else:\n seen[v] = k\n result[v] = k\n return seen","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":11277,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-02 16:01:26","func_code":"def swap_unique_keys_values(d):\n seen = {}\n result = {}\n for k, v in list(d.items()):\n if v in seen:\n del seen[v]\n else:\n seen[v] = k\n result[v] = k\n return seen","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":19695,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-02 16:01:26","func_code":"def swap_unique_keys_values(d):\n seen = {}\n result = {}\n for k, v in list(d.items()):\n if v in seen:\n del seen[v]\n else:\n seen[v] = k\n result[v] = k\n return seen","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":7022,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-02 16:01:55","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n uniqueness = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n uniqueness.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n uniqueness[i] = A\n uniqueness[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(uniqueness):\n if uniqueness[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":26153,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-02 16:01:55","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n uniqueness = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n uniqueness.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n uniqueness[i] = A\n uniqueness[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(uniqueness):\n if uniqueness[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":7670,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-02 16:40:41","func_code":"def swap_keys_values(d):\n new_dict = {}\n for keys in list(d.keys()):\n temp = d[keys]\n new_dict[temp] = keys\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":2258,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-02 16:40:41","func_code":"def swap_keys_values(d):\n new_dict = {}\n for keys in list(d.keys()):\n temp = d[keys]\n new_dict[temp] = keys\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":14718,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-02 16:53:34","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for keys in list(d.keys()):\n temp = d[keys]\n if temp in new_dict:\n del new_dict[temp]\n else:\n new_dict[temp] = keys\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":41218,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-02 16:53:34","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for keys in list(d.keys()):\n temp = d[keys]\n if temp in new_dict:\n del new_dict[temp]\n else:\n new_dict[temp] = keys\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":11224,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-02 16:53:34","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for keys in list(d.keys()):\n temp = d[keys]\n if temp in new_dict:\n del new_dict[temp]\n else:\n new_dict[temp] = keys\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":23522,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-02 17:02:33","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":25020,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-02 17:02:33","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":14619,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:15:11","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n return swapped_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":24850,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:15:11","func_code":"def swap_keys_values(d):\n swapped_d = {}\n for key in d:\n swapped_d[d[key]] = key\n return swapped_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":5787,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-02 17:25:18","func_code":"def swap_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":37565,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-02 17:25:18","func_code":"def swap_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":33876,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-02 17:31:36","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":34108,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-02 17:31:55","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k in d:\n v = d.get(k)\n if v in new_d:\n del new_d[v]\n else:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":5325,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-02 17:31:55","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k in d:\n v = d.get(k)\n if v in new_d:\n del new_d[v]\n else:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":10585,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-02 17:31:55","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n for k in d:\n v = d.get(k)\n if v in new_d:\n del new_d[v]\n else:\n new_d[v] = k\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":11066,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:46:05","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(uniqueness):\n if uniqueness[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":5461,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:46:16","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(uniqueness):\n if uniqueness[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":18677,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:46:39","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(unique):\n if uniqueness[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":34211,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:48:23","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(unique):\n if uniqueness[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":1998,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:48:40","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(unique):\n if unique[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":11118,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:48:40","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(unique):\n if unique[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":24708,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-02 17:48:40","func_code":"def swap_unique_keys_values(d):\n A = False\n keys = []\n values = []\n unique = []\n swapped_unique_d = {}\n for key in d:\n keys.append(key)\n values.append(d[key])\n for item in keys:\n unique.append(True)\n i = 0\n while i < len(keys):\n p = i + 1\n while p < len(values):\n if values[i] == values[p]:\n unique[i] = A\n unique[p] = A\n p += 1\n i += 1\n j = 0\n while j < len(unique):\n if unique[j]:\n swapped_unique_d[values[j]] = keys[j]\n j += 1\n return swapped_unique_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":40412,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-02 18:16:13","func_code":"def swap_keys_values(d):\n for i in d:\n j[d[i]] = i\n return j","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":7362,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-02 18:16:40","func_code":"def swap_keys_values(d):\n for i in d:\n j[d[i]] = i\n return j","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":19911,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-02 18:16:40","func_code":"def swap_keys_values(d):\n for i in d:\n j[d[i]] = i\n return j","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":37624,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-03-02 18:18:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n doubles = set()\n for k, v in list(d.items()):\n if v in new_d:\n doubles.add(v)\n new_d[v] = k\n for k in doubles:\n del new_d[k]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":39019,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-03-02 18:18:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n doubles = set()\n for k, v in list(d.items()):\n if v in new_d:\n doubles.add(v)\n new_d[v] = k\n for k in doubles:\n del new_d[k]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":2668,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-03-02 18:18:07","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n doubles = set()\n for k, v in list(d.items()):\n if v in new_d:\n doubles.add(v)\n new_d[v] = k\n for k in doubles:\n del new_d[k]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":41286,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-02 18:21:54","func_code":"def swap_keys_values():\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":34633,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-02 18:22:24","func_code":"def swap_keys_values(d):\n {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":35033,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-02 18:22:59","func_code":"def swap_keys_values(d):\n {v: k for k, v in d}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":27166,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-02 18:23:49","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":16270,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-02 18:23:49","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":3233,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-02 18:29:36","func_code":"def swap_unique_keys_values(d):\n for i in d:\n if d[i] in j:\n del j[d[i]]\n else:\n j[d[i]] = i\n return j","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":9694,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-02 18:29:36","func_code":"def swap_unique_keys_values(d):\n for i in d:\n if d[i] in j:\n del j[d[i]]\n else:\n j[d[i]] = i\n return j","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":12663,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-02 18:29:36","func_code":"def swap_unique_keys_values(d):\n for i in d:\n if d[i] in j:\n del j[d[i]]\n else:\n j[d[i]] = i\n return j","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":39818,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-02 18:33:40","func_code":"def swap_unique_keys_values(d):\n n_dict = {}\n double = set()\n for k, v in list(d.items()):\n if v in n_dict:\n double.add(v)\n n_dict[v] = k\n for k in double:\n del n_dict[k]\n return n_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":18889,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-02 18:33:40","func_code":"def swap_unique_keys_values(d):\n n_dict = {}\n double = set()\n for k, v in list(d.items()):\n if v in n_dict:\n double.add(v)\n n_dict[v] = k\n for k in double:\n del n_dict[k]\n return n_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":9399,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-02 18:33:40","func_code":"def swap_unique_keys_values(d):\n n_dict = {}\n double = set()\n for k, v in list(d.items()):\n if v in n_dict:\n double.add(v)\n n_dict[v] = k\n for k in double:\n del n_dict[k]\n return n_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":8138,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-03-02 19:29:55","func_code":"def swap_keys_values(d):\n new_dictionary = {}\n for x in d:\n key = x\n value = d[x]\n new_dictionary[value] = key\n return new_dictionary","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":22505,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-03-02 19:29:55","func_code":"def swap_keys_values(d):\n new_dictionary = {}\n for x in d:\n key = x\n value = d[x]\n new_dictionary[value] = key\n return new_dictionary","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":24919,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-03-02 19:35:41","func_code":"def swap_unique_keys_values(d):\n new_dictionary = {}\n for x in d:\n key = x\n value = d[x]\n new_dictionary[value] = key\n new_dictionary.pop(7)\n return new_dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":12379,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-03-02 19:35:41","func_code":"def swap_unique_keys_values(d):\n new_dictionary = {}\n for x in d:\n key = x\n value = d[x]\n new_dictionary[value] = key\n new_dictionary.pop(7)\n return new_dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":38828,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-02 19:56:40","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":35931,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-02 19:57:55","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":21319,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-02 19:57:55","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":13041,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-02 20:09:47","func_code":"def swap_unique_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":20060,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-02 20:09:47","func_code":"def swap_unique_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":18626,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-02 20:09:47","func_code":"def swap_unique_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37485,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:30:11","func_code":"def swap_keys_values(d):\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n return swapped_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":39525,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:30:11","func_code":"def swap_keys_values(d):\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n return swapped_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":12169,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:36:31","func_code":"def swap_unique_keys_values(d):\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n return set(swapped_dict)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":29563,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:37:00","func_code":"def swap_unique_keys_values(d):\n swapped_dict = set(dict(list(zip(list(d.values()), list(d.keys())))))\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":25878,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:39:09","func_code":"def swap_unique_keys_values(d):\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n return set(swapped_dict)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":20903,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:40:44","func_code":"def swap_unique_keys_values(d):\n swapped_dict = {v: k for k, v in list(d.items())}\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":35757,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:41:03","func_code":"def swap_unique_keys_values(d):\n swapped_dict = {v: k for k, v in list(d.items())}\n return set(swapped_dict)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":447,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:44:21","func_code":"def swap_keys_values(d):\n reversed_d = {(v, k) for k, v in d.items()}\n return reversed_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":5947,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:46:03","func_code":"def swap_keys_values(d):\n reversed_d = dict((v, k) for k, v in d.items())\n return reversed_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":26413,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 20:46:31","func_code":"def swap_unique_keys_values(d):\n seen = list(d.keys())\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n for v, k in swapped_dict:\n if k in seen:\n break\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":31724,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:52:03","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":31252,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:52:03","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":37878,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:58:12","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v in list(d.values())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":18577,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:58:12","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v in list(d.values())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":4460,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-02 20:58:12","func_code":"def swap_unique_keys_values(d):\n return {v: k for k, v in list(d.items()) if v in list(d.values())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":31328,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 21:05:10","func_code":"def swap_unique_keys_values(d):\n seen = list(d.keys())\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n print(list(swapped_dict.values()))\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":16992,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 22:04:36","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n unique = [x for x in values if values.count(x) == 1]\n swapped_dict = 0\n if unique in values:\n swapped_dict = dict(list(zip(list(d.values()), list(d.keys()))))\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":31682,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 22:08:05","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n unique = [x for x in values if values.count(x) == 1]\n swapped_dict = 0\n if unique in values:\n swapped_dict = {v: k for k, v in list(d.items())}\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":29552,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 22:08:46","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n unique = [x for x in values if values.count(x) == 1]\n swapped_dict = 0\n if unique == True:\n swapped_dict = {v: k for k, v in list(d.items())}\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":23605,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 22:08:46","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n unique = [x for x in values if values.count(x) == 1]\n swapped_dict = 0\n if unique == True:\n swapped_dict = {v: k for k, v in list(d.items())}\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32913,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-02 22:08:46","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n unique = [x for x in values if values.count(x) == 1]\n swapped_dict = 0\n if unique == True:\n swapped_dict = {v: k for k, v in list(d.items())}\n return swapped_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":14667,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-03-02 22:48:17","func_code":"def swap_keys_values():\n {v: k for k, v in list(sys.argv[1].items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":37994,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-03-02 22:49:05","func_code":"def swap_keys_values():\n {v: k for k, v in list(sys.argv[0].items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":19620,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-02 22:54:31","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":995,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-02 22:54:31","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":26911,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-02 22:54:31","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":33246,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-03 00:21:11","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = {}\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] += 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":13411,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-03 08:52:27","func_code":"def swap_keys_values(d):\n list(zip(list(d.values()), list(d.keys())))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":10644,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-03 08:54:31","func_code":"def swap_keys_values(d):\n return dict(list(zip(list(d.values()), list(d.keys()))))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":40318,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-03 09:02:29","func_code":"def swap_keys_values(d):\n l = Counter(list(d.values()))\n return {value: key for key, value in list(d.items()) if l[value] == 1}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":3227,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-03 09:02:29","func_code":"def swap_keys_values(d):\n l = Counter(list(d.values()))\n return {value: key for key, value in list(d.items()) if l[value] == 1}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":17341,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-03 09:03:44","func_code":"def swap_unique_keys_values(d):\n l = Counter(list(d.values()))\n return {value: key for key, value in list(d.items()) if l[value] == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":41038,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-03 09:03:44","func_code":"def swap_unique_keys_values(d):\n l = Counter(list(d.values()))\n return {value: key for key, value in list(d.items()) if l[value] == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":9947,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-03 09:11:59","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":5220,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-03 09:11:59","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":3174,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-03 09:20:19","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":1949,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-03 09:20:19","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":16575,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:21:18","func_code":"def swap_keys_values(a):\n for k, v in a.items:\n tmp = k\n k = v\n v = tmp\n return sorted(a)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":11761,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-03 09:21:39","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for t, v in list(in_dict.items()):\n out_dict[v] = t\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":11408,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-03 09:21:39","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for t, v in list(in_dict.items()):\n out_dict[v] = t\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":33796,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:22:10","func_code":"def swap_keys_values(a):\n for k, v in list(a.items()):\n tmp = k\n k = v\n v = tmp\n return sorted(a)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":4498,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:22:58","func_code":"def swap_keys_values(a):\n for k, v in list(a.items()):\n tmp = k\n k = v\n v = tmp\n print(a)\n return sorted(a)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":26976,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-03 09:28:17","func_code":"def swap_unique_keys_values(d):\n new = {}\n for k in d:\n v = d.get(k)\n if v in new:\n del ne[v]\n else:\n new[v] = k\n return new","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":26190,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-03 09:29:05","func_code":"def swap_unique_keys_values(d):\n new = {}\n for k in d:\n v = d.get(k)\n if v in new:\n del new[v]\n else:\n new[v] = k\n return new","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":26082,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-03 09:29:05","func_code":"def swap_unique_keys_values(d):\n new = {}\n for k in d:\n v = d.get(k)\n if v in new:\n del new[v]\n else:\n new[v] = k\n return new","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":8714,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:36:54","func_code":"def swap_keys_values(a):\n for i in a:\n tmp = i\n i = a[i]\n a[i] = tmp\n return sorted(a)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":26041,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:40:45","func_code":"def swap_keys_values(a):\n dir = {}\n for i in a:\n dir[a[i]] = i\n return sorted(dir)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":7841,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:42:23","func_code":"def swap_keys_values(a):\n dir = {}\n for i in a:\n dir[a[i]] = i\n return dir","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":26525,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:42:23","func_code":"def swap_keys_values(a):\n dir = {}\n for i in a:\n dir[a[i]] = i\n return dir","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":30805,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:53:33","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.items()):\n if a.count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if dir[a[i]] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":27754,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:54:13","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.items()):\n if no.count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if dir[a[i]] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":26699,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:55:18","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.items()):\n if no.count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n k = dir[a[i]]\n if k not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":21171,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:56:40","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.items()):\n if no.count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":39350,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:57:19","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.items()):\n if no.count(a) > 1:\n lis.append(no)\n print(lis)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":946,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:58:32","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.items()):\n print(no.count(a))\n if no.count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":12615,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:59:01","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(no.count(a))\n if no.count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":21073,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:59:35","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n if a.count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":12010,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 09:59:58","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n if int(no).count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8938,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:00:16","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n if str(no).count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":18278,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:01:24","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(str(no).count(a))\n if str(no).count(a) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":13179,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:02:07","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(str(no).count(list(a.values())))\n if str(no).count(list(a.values())) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":17953,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:02:25","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(no.count(list(a.values())))\n if no.count(list(a.values())) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":15240,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:03:07","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n if no.count(list(a.values())) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37032,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:03:52","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n if list(a.values()).count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":9695,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:05:50","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(list(a.values()).count(no))\n if list(a.values()).count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":16858,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:06:15","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(values)\n print(list(a.values()).count(no))\n if list(a.values()).count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":35380,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:06:31","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(a.values)\n if list(a.values()).count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":16215,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:07:46","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n print(d1)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":7472,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:08:33","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in list(a.values()):\n print(list(a.values()))\n if list(a.values()).count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":9973,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:09:53","func_code":"def swap_unique_keys_values(a):\n lis = []\n val = list(a.values())\n for no in val:\n if val.count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":23736,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:10:14","func_code":"def swap_unique_keys_values(a):\n lis = []\n val = list(a.values())\n for no in val:\n print(val)\n if val.count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":28795,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:10:48","func_code":"def swap_unique_keys_values(a):\n lis = []\n val = list(a.values())\n for no in val:\n print(lis(val))\n if val.count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":10098,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:11:29","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n print(list(d1.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":15029,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-03 10:11:37","func_code":"def swap_keys_values(d):\n new_dict = {}\n for k in d:\n new_dict[d[k]] = k\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":507,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-03 10:11:37","func_code":"def swap_keys_values(d):\n new_dict = {}\n for k in d:\n new_dict[d[k]] = k\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":38789,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:11:42","func_code":"def swap_unique_keys_values(a):\n lis = []\n val = list(a.values())\n for no in val:\n print(val[0])\n if val.count(no) > 1:\n lis.append(no)\n dir = {}\n for i in a:\n if a[i] not in lis:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":35572,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:12:10","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items()).sorted()}\n print(list(d1.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":17211,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:12:38","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.sorted().items())}\n print(list(d1.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":2191,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:14:06","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n print(list(d1.items()).sorted())","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":17713,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:14:55","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n for c in d1:\n print(c)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":26123,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:15:15","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n for c in d1:\n print(c)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":31249,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:18:24","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n print(list(d1.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":27871,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:19:19","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n return d1","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":15088,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:19:19","func_code":"def swap_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n return d1","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":38651,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2017-03-03 10:21:52","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":5555,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2017-03-03 10:21:52","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":25135,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-03 10:23:11","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n a = []\n for v in list(d.values()):\n a.append(v)\n for k in d:\n if a.count(d[k]) == 1:\n new_dict[d[k]] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":22872,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-03 10:23:11","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n a = []\n for v in list(d.values()):\n a.append(v)\n for k in d:\n if a.count(d[k]) == 1:\n new_dict[d[k]] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":1377,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:24:42","func_code":"def swap_unique_keys_values():\n d1 = {v: k for k, v in list(d.items()) if d.count(v) == 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37912,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:27:52","func_code":"def swap_unique_keys_values():\n d1 = {v: k for k, v in list(d.items()) if d.count(d[v]) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":38639,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2017-03-03 10:29:44","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":15929,"user":"a58f503b-2a5d-430c-aea3-11134a0daeb8","date":"2017-03-03 10:29:44","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":5813,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:31:00","func_code":"def swap_unique_keys_values():\n d1 = {v: k for k, v in list(d.items()) if len(v) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":14872,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:31:35","func_code":"def swap_unique_keys_values():\n d1 = {v: k for k, v in list(d.items()) if len(v) == 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":28302,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:33:38","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items()) if d.count(d[v]) == 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":13376,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:34:55","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items()) if len(v) > 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":29920,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:35:11","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items()) if len(d[v]) > 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":11914,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:36:06","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items()) if list(d.items()).count(v) == 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":19156,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:36:19","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items()) if d.count(v) == 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":25155,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:36:30","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items()) if d.count(d[v]) == 1}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":23517,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:37:38","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n print(d1)\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":17874,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:40:10","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(no)\n dir = {}\n for i in a:\n if no.count(lis) > 1:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":41929,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:40:34","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(no)\n dir = {}\n for i in a:\n if lis.count(no) > 1:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32772,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:41:05","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(no)\n dir = {}\n for i in a:\n if lis.count(no) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":40074,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:41:46","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(no)\n dir = {}\n print(lis)\n for i in a:\n if lis.count(no) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32134,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:42:08","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(a[no])\n dir = {}\n for i in a:\n if lis.count(no) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":34938,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:42:28","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(a[no])\n dir = {}\n print(lis)\n for i in a:\n if lis.count(no) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":20258,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:42:45","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(a[no])\n dir = {}\n print(lis)\n for i in a:\n if no.count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":39349,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:44:24","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(a[no])\n dir = {}\n for i in a:\n if a[no].count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":16624,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-03 10:44:57","func_code":"def swap_keys_values(d):\n d2 = dict((v, k) for k, v in list(d.items()))\n return d2","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":11240,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-03 10:44:57","func_code":"def swap_keys_values(d):\n d2 = dict((v, k) for k, v in list(d.items()))\n return d2","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":16177,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:45:06","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(str(a[no]))\n dir = {}\n for i in a:\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":17106,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:46:02","func_code":"def swap_unique_keys_values(a):\n lis = []\n for no in a:\n lis.append(str(a[no]))\n dir = {}\n for i in a:\n if lis.count(str(a[no])) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8049,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:46:12","func_code":"def swap_unique_keys_values(d):\n d1 = {v: k for k, v in list(d.items())}\n for c in d1:\n print(c)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":29206,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:46:55","func_code":"def swap_unique_keys_values(d):\n d1 = list(d.items())\n print(d1)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32220,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-03 10:46:59","func_code":"def swap_unique_keys_values(d):\n dict = {}\n for k in d:\n v = d.get(k)\n if v in dict:\n del dict[v]\n else:\n dict[v] = k\n return dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":5783,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-03 10:46:59","func_code":"def swap_unique_keys_values(d):\n dict = {}\n for k in d:\n v = d.get(k)\n if v in dict:\n del dict[v]\n else:\n dict[v] = k\n return dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":25089,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:48:05","func_code":"def swap_unique_keys_values(d):\n d = list(d.items())\n for c in d:\n print(c)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":18511,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:48:23","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += a[no]\n dir = {}\n for i in a:\n if lis.count(str(a[no])) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":31009,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:48:44","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += a[no]\n dir = {}\n for i in a:\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":39221,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:49:08","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += str(a[no])\n dir = {}\n for i in a:\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":2240,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:49:33","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += str(a[no])\n dir = {}\n print(lis)\n for i in a:\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":39268,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:50:10","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += str(a[no])\n dir = {}\n print(lis)\n for i in a:\n print(str(a[no]).count(lis))\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":26592,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:51:20","func_code":"def swap_unique_keys_values(d):\n d = list(d.items())\n l = [(v, k) for k, v in d if d.count(c[1]) == 1]\n print(l)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":42153,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:51:30","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += str(a[no])\n dir = {}\n print(lis)\n for i in a:\n print(lis.count(str(a[no])))\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":5983,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 10:51:57","func_code":"def swap_unique_keys_values(d):\n d = list(d.items())\n l = [v for k, v in d]\n print(l)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":11323,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 10:58:25","func_code":"def swap_unique_keys_values(a):\n lis = ''\n for no in a:\n lis += str(a[no])\n dir = {}\n print(lis)\n for i in a:\n print(str(a[no]).count(lis))\n if str(a[no]).count(lis) < 2:\n dir[a[i]] = i\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":17509,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-03 11:02:40","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] += 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":34097,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-03 11:03:06","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] += 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":35400,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-03 11:03:06","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] += 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32126,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:08:58","func_code":"def swap_unique_keys_values(d):\n d = list(d.items())\n l = [v for k, v in d]\n z = []\n for c in l:\n if l.count(c) == 1:\n z.append(c)\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":9178,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:09:21","func_code":"def swap_unique_keys_values(d):\n l = [v for k, v in d]\n z = []\n for c in l:\n if l.count(c) == 1:\n z.append(c)\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8895,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:10:47","func_code":"def swap_unique_keys_values(d):\n l = [(k, v) for k, v in d]\n z = []\n for c in l:\n if l.count(c[1]) == 1:\n z.append(c[1])\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":38701,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:12:16","func_code":"def swap_unique_keys_values(d):\n z = []\n for c in list(d.items()):\n if l.count(c[1]) == 1:\n z.append(c[1])\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":4730,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:12:43","func_code":"def swap_unique_keys_values(d):\n z = []\n for c in list(d.items()):\n if list(d.items()).count(c[1]) == 1:\n z.append(c[1])\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":15618,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:13:12","func_code":"def swap_unique_keys_values(d):\n z = []\n for c in list(d.items()):\n print(c)\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":12777,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:13:46","func_code":"def swap_unique_keys_values(d):\n z = []\n for c in list(d.items()):\n print(c[1])\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":41611,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:14:25","func_code":"def swap_unique_keys_values(d):\n z = []\n for c in list(d.items()):\n z.append(c[1])\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":29782,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-03 11:14:48","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n d2 = {}\n unique = []\n for k in list(d.keys()):\n if k in d:\n d1[k] += 1\n else:\n d1[k] = 1\n for k, v in list(d.items()):\n if d1[k] == 1:\n d2[v] = k\n else:\n continue\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":13972,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-03 11:15:38","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n d2 = {}\n unique = []\n for k in list(d.keys()):\n if k in d1:\n d1[k] += 1\n else:\n d1[k] = 1\n for k, v in list(d.items()):\n if d1[k] == 1:\n d2[v] = k\n else:\n continue\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":24511,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:15:46","func_code":"def swap_unique_keys_values(d):\n z = []\n l = []\n for c in list(d.items()):\n l.append(c[1])\n for c in l:\n if l.count(c) == 1:\n z.append(c)\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":27490,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-03 11:15:46","func_code":"def swap_unique_keys_values(d):\n z = []\n l = []\n for c in list(d.items()):\n l.append(c[1])\n for c in l:\n if l.count(c) == 1:\n z.append(c)\n d1 = {v: k for k, v in list(d.items()) if v in z}\n return d1","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":35468,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-03 11:16:03","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":12557,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-03 11:16:03","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":42233,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-03 11:17:08","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n d2 = {}\n unique = []\n for v in list(d.values()):\n if v in d1:\n d1[v] += 1\n else:\n d1[v] = 1\n for k, v in list(d.items()):\n if d1[v] == 1:\n d2[v] = k\n else:\n continue\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":2979,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-03 11:17:08","func_code":"def swap_unique_keys_values(d):\n d1 = {}\n d2 = {}\n unique = []\n for v in list(d.values()):\n if v in d1:\n d1[v] += 1\n else:\n d1[v] = 1\n for k, v in list(d.items()):\n if d1[v] == 1:\n d2[v] = k\n else:\n continue\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":19626,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-03 11:22:02","func_code":"def swap_keys_values(d):\n dic = {}\n for key, value in list(d.items()):\n dic[value] = key\n return dic","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":12744,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-03 11:22:02","func_code":"def swap_keys_values(d):\n dic = {}\n for key, value in list(d.items()):\n dic[value] = key\n return dic","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":34420,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-03 11:27:14","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n alltupps = [(v, k) for k, v in d]\n return alltupps","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37484,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 11:28:21","func_code":"def swap_unique_keys_values(d):\n global skip\n check = []\n for x in list(d.keys()):\n if d[x] not in check:\n check.append(d[x])\n else:\n skip.append(d[x])\n return skip","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":32046,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-03 11:29:28","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n alltupps = [(v, k) for k, v in list(d.items())]\n return alltupps","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":38991,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-03 11:30:01","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blacklist = set()\n for k, v in list(in_dict.items()):\n if v in out_dict:\n blacklist.update([v])\n del out_dict[v]\n elif v not in blacklist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":36906,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-03 11:30:01","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blacklist = set()\n for k, v in list(in_dict.items()):\n if v in out_dict:\n blacklist.update([v])\n del out_dict[v]\n elif v not in blacklist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":6000,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-03 11:30:45","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for k, v in list(in_dict.items()):\n out_dict[v] = k\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":40623,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-03 11:30:45","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for k, v in list(in_dict.items()):\n out_dict[v] = k\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":32055,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-03 11:31:56","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n alltupps = []\n for k, v in list(d.items()):\n alltupps.append(v, k)\n return alltupps","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":18749,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-03 11:32:27","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n alltupps = []\n for k, v in list(d.items()):\n alltupps.append((v, k))\n return alltupps","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":15588,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-03 11:33:15","func_code":"def swap_unique_keys_values(d):\n dic = {}\n for key, value in list(d.items()):\n if value not in dic:\n dic[value] = key\n else:\n del dic[value]\n return dic","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":20267,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-03 11:33:15","func_code":"def swap_unique_keys_values(d):\n dic = {}\n for key, value in list(d.items()):\n if value not in dic:\n dic[value] = key\n else:\n del dic[value]\n return dic","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":5958,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:35:51","func_code":"def swap_keys_values(swap_me):\n print(list({swap_me[key]: key for key in list(swap_me.keys())}.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":23944,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:36:37","func_code":"def swap_keys_values(swap_me):\n print(list({swap_me[key]: key for key in list(swap_me.keys())}.items())\n .sort(key=lambda x: x[0]))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":20502,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:37:14","func_code":"def swap_keys_values(swap_me):\n o = list({swap_me[key]: key for key in list(swap_me.keys())}.items())\n o.sort(key=lambda x: x[0])\n print(o)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":32480,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:37:50","func_code":"def swap_keys_values(swap_me):\n o = {swap_me[key]: key for key in list(swap_me.keys())}\n o = list(o.items())\n o = list(o)\n o.sort(key=lambda x: x[0])\n print(o)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":32872,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:38:24","func_code":"def swap_keys_values(swap_me):\n if swap_me is not None:\n o = {swap_me[key]: key for key in list(swap_me.keys())}\n o = list(o.items())\n o = list(o)\n o.sort(key=lambda x: x[0])\n print(o)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":36921,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-03 11:38:37","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for k, v in list(in_dict.items()):\n out_dict[v] = k\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":11933,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-03 11:38:37","func_code":"def swap_keys_values(in_dict):\n out_dict = {}\n for k, v in list(in_dict.items()):\n out_dict[v] = k\n return out_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":7234,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:38:56","func_code":"def swap_keys_values(swap_me):\n if swap_me is not None:\n return {swap_me[key]: key for key in list(swap_me.keys())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":1594,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:38:56","func_code":"def swap_keys_values(swap_me):\n if swap_me is not None:\n return {swap_me[key]: key for key in list(swap_me.keys())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":13161,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-03 11:39:56","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blacklist = set()\n for k, v in list(in_dict.items()):\n if v in out_dict:\n blacklist.update([v])\n del out_dict[v]\n elif v not in blacklist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":38004,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-03 11:39:56","func_code":"def swap_unique_keys_values(in_dict):\n out_dict = {}\n blacklist = set()\n for k, v in list(in_dict.items()):\n if v in out_dict:\n blacklist.update([v])\n del out_dict[v]\n elif v not in blacklist:\n out_dict[v] = k\n return out_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":35150,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 11:41:45","func_code":"def seen(k, v):\n global skip\n if v in skip:\n return k, v\n else:\n return v, k\n\n\ndef swap_unique_keys_values(d):\n global skip\n check = []\n for x in list(d.keys()):\n if d[x] not in check:\n check.append(d[x])\n else:\n skip.append(d[x])\n d = [seen(k, v) for k, v in list(d.items())]\n print(d)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8245,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:42:04","func_code":"def swap_unique_keys_values(swap_me):\n if swap_me is not None:\n d = {swap_me[key]: key for key in list(set(swap_me.keys)) if\n swap_me[key]}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":35,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:42:29","func_code":"def swap_unique_keys_values(swap_me):\n if swap_me is not None:\n d = {swap_me[key]: key for key in list(set(swap_me.keys())) if\n swap_me[key]}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":41412,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:42:52","func_code":"def swap_unique_keys_values(swap_me):\n if swap_me is not None:\n return {swap_me[key]: key for key in list(set(swap_me.keys())) if\n swap_me[key]}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":11547,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 11:47:41","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":13165,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 11:47:41","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":14271,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 11:51:07","func_code":"def swap_unique_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":9261,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:53:19","func_code":"def swap_unique_keys_values(swap_me):\n if swap_me is not None:\n return {swap_me[key]: key for key in list(swap_me.keys()) if list(\n swap_me.values()).count(swap_me[key]) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":5536,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-03 11:53:19","func_code":"def swap_unique_keys_values(swap_me):\n if swap_me is not None:\n return {swap_me[key]: key for key in list(swap_me.keys()) if list(\n swap_me.values()).count(swap_me[key]) == 1}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":15443,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-03 12:08:24","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n alltupps = []\n newlist = []\n for k, v in list(d.items()):\n alltupps.append((v, k))\n alltupps = sorted(alltupps)\n i = 0\n while i < len(alltupps) - 1:\n if alltupps[i][0] != alltupps[i + 1][0]:\n newlist.append(alltupps[i])\n else:\n i += 1\n i += 1\n if alltupps[-2][0] != alltupps[-1][0]:\n newlist.append(alltupps[-1])\n return dict(newlist)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":31839,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-03 12:08:24","func_code":"def swap_unique_keys_values(d):\n tempd = {}\n alltupps = []\n newlist = []\n for k, v in list(d.items()):\n alltupps.append((v, k))\n alltupps = sorted(alltupps)\n i = 0\n while i < len(alltupps) - 1:\n if alltupps[i][0] != alltupps[i + 1][0]:\n newlist.append(alltupps[i])\n else:\n i += 1\n i += 1\n if alltupps[-2][0] != alltupps[-1][0]:\n newlist.append(alltupps[-1])\n return dict(newlist)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":31608,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-03 12:31:35","func_code":"def swap_keys_values(x):\n new_d = dict((v, k) for k, v in list(x.items()))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":9309,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-03 12:31:35","func_code":"def swap_keys_values(x):\n new_d = dict((v, k) for k, v in list(x.items()))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":39705,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-03 12:43:35","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":32152,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-03 12:48:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":6906,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-03 12:48:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":26337,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-03 12:48:44","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":4548,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-03 12:48:44","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":37349,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-03 12:48:44","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":26513,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-03 12:55:48","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":36714,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-03 12:55:48","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":477,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-03 12:58:23","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":17636,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-03 12:58:23","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":26298,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 12:58:49","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[keys[i]] = vals[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":15014,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 12:59:19","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":11621,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-03 12:59:19","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":40628,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-03 12:59:43","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":4629,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-03 12:59:43","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":29199,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-03 12:59:43","func_code":"def swap_unique_keys_values(d):\n store = {}\n value = []\n va = list(d.values())\n for i in va:\n value.append(i)\n for k, v in list(d.items()):\n if value.count(v) == 1:\n store[k] = v\n return {v: k for k, v in list(store.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":23537,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-03-03 13:23:25","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":32907,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-03-03 13:23:25","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":23761,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-03-03 13:24:04","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":12317,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-03-03 13:24:04","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":26551,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-03 13:31:47","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n values = []\n keys = []\n for z, q in list(d.items()):\n keys.append(q)\n values.append(z)\n for z, q in list(d.items()):\n if not keys.count(q) > 1:\n new_dict[q] = z\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":4808,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-03 13:31:47","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n values = []\n keys = []\n for z, q in list(d.items()):\n keys.append(q)\n values.append(z)\n for z, q in list(d.items()):\n if not keys.count(q) > 1:\n new_dict[q] = z\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":39293,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-03 13:34:04","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n values = []\n keys = []\n for z, q in list(d.items()):\n keys.append(q)\n values.append(z)\n for z, q in list(d.items()):\n if not keys.count(q) > 1:\n new_dict[q] = z\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":22369,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-03 13:34:04","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n values = []\n keys = []\n for z, q in list(d.items()):\n keys.append(q)\n values.append(z)\n for z, q in list(d.items()):\n if not keys.count(q) > 1:\n new_dict[q] = z\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":34832,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-03 13:46:47","func_code":"def swap_keys_values(d):\n new_dict = {}\n for z, q in list(d.items()):\n new_dict[q] = z\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":5912,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-03 13:46:47","func_code":"def swap_keys_values(d):\n new_dict = {}\n for z, q in list(d.items()):\n new_dict[q] = z\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":22474,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 14:55:53","func_code":"def swap_unique_keys_values(a):\n value = list(a.values())\n keys = list(a.keys())\n dir = {}\n for i in a:\n if values.count(value[i]) < 2:\n dir[value[i]] = keys[i]\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":1847,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 14:56:10","func_code":"def swap_unique_keys_values(a):\n value = list(a.values())\n keys = list(a.keys())\n dir = {}\n for i in a:\n if value.count(value[i]) < 2:\n dir[value[i]] = keys[i]\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":9022,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 14:56:54","func_code":"def swap_unique_keys_values(a):\n value = list(a.values())\n keys = list(a.keys())\n dir = {}\n for i in range(0, len(vaules)):\n if value.count(value[i]) < 2:\n dir[value[i]] = keys[i]\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":5967,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 14:57:18","func_code":"def swap_unique_keys_values(a):\n value = list(a.values())\n keys = list(a.keys())\n dir = {}\n for i in range(0, len(value)):\n if value.count(value[i]) < 2:\n dir[value[i]] = keys[i]\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":31877,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 14:57:18","func_code":"def swap_unique_keys_values(a):\n value = list(a.values())\n keys = list(a.keys())\n dir = {}\n for i in range(0, len(value)):\n if value.count(value[i]) < 2:\n dir[value[i]] = keys[i]\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":32595,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-03 14:57:18","func_code":"def swap_unique_keys_values(a):\n value = list(a.values())\n keys = list(a.keys())\n dir = {}\n for i in range(0, len(value)):\n if value.count(value[i]) < 2:\n dir[value[i]] = keys[i]\n return dir","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":33842,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:21:57","func_code":"def swap_keys_values(d):\n new_d = {}\n for key, val in d:\n new_d[val] = key\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":37838,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:28:26","func_code":"def swap_keys_values(d):\n new_d = {}\n for key, val in d.items:\n new_d[val] = key\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":8982,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:28:55","func_code":"def swap_keys_values(d):\n new_d = {}\n for key, val in list(d.items()):\n new_d[val] = key\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":28850,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:28:55","func_code":"def swap_keys_values(d):\n new_d = {}\n for key, val in list(d.items()):\n new_d[val] = key\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":41965,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:38:11","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n dups = []\n for key, val in list(d.items()):\n if val not in dups:\n new_d[val] = key\n dups.append(val)\n else:\n del new_d[val]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":2534,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:38:11","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n dups = []\n for key, val in list(d.items()):\n if val not in dups:\n new_d[val] = key\n dups.append(val)\n else:\n del new_d[val]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":11764,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-03 15:38:11","func_code":"def swap_unique_keys_values(d):\n new_d = {}\n dups = []\n for key, val in list(d.items()):\n if val not in dups:\n new_d[val] = key\n dups.append(val)\n else:\n del new_d[val]\n return new_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":13984,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-03 15:49:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":20309,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-03 15:49:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":3192,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-03 15:49:19","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":17682,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-03 17:41:24","func_code":"def swap_unique_keys_values(d):\n new_dict = dict()\n for k in d:\n v = d.get[k]\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":28577,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-03 17:46:26","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":12616,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-03 17:46:26","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":9420,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-03 17:46:26","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":13341,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-03 18:03:40","func_code":"def swap_unique_keys_values(d):\n seen = []\n return {v: k for k, v in list(d.items())}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":7299,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-03 18:08:58","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n return {v: k for k, v in list(d.items()) if values.count(v) < 2}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":4938,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-03 18:08:58","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n return {v: k for k, v in list(d.items()) if values.count(v) < 2}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":29918,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-03 18:26:42","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":37124,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-03 18:26:42","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":7963,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-03 18:27:01","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":31270,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-03 18:27:01","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":39540,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-03 18:27:01","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":27131,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 18:28:43","func_code":"def swap_keys_values(d):\n e = {}\n for k, v in d:\n e[v] = k\n return e","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":36734,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 18:30:10","func_code":"def swap_keys_values(d):\n e = {}\n for k, v in list(d.items()):\n e[v] = k\n return e","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":13032,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 18:30:10","func_code":"def swap_keys_values(d):\n e = {}\n for k, v in list(d.items()):\n e[v] = k\n return e","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":8640,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2017-03-03 18:44:04","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":21122,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2017-03-03 18:44:04","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":34332,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2017-03-03 18:44:13","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":8805,"user":"54b87e3d-5711-4a83-a6d1-ed14ae588835","date":"2017-03-03 18:44:13","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":29317,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:46:08","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in d.items())","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":1983,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:46:42","func_code":"def swap_keys_values(d):\n return dict((v, k) for k, v in d.items())","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":2250,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:47:13","func_code":"def swap_keys_values(d):\n return {(v, k) for k, v in d.items()}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":41552,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:48:01","func_code":"def swap_keys_values(d):\n print([(4, 'a'), (7, 'b'), (10, 'c')])","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":40671,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:48:26","func_code":"def swap_keys_values(d):\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":35280,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:48:56","func_code":"def swap_keys_values(d):\n print(dict((v, k) for k, v in d.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":21560,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:50:39","func_code":"def swap_keys_values(d):\n print(dict((v, k) for k, v in list(d.items())))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":21088,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-03 18:51:06","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":17952,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-03 18:51:06","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":3278,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-03 18:52:02","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":11931,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:52:36","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":24620,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-03 18:52:37","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":17930,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-03 18:52:37","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":22339,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-03 18:52:37","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":23990,"user":"f94d128e-c997-4cca-8a7e-2216c3966829","date":"2017-03-03 18:52:52","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":36151,"user":"f94d128e-c997-4cca-8a7e-2216c3966829","date":"2017-03-03 18:52:52","func_code":"def swap_keys_values(d):\n return {k: v for v, k in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":5124,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:52:56","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n list(d.items())","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":37633,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-03 18:53:10","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":31468,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-03 18:53:10","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":14714,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-03 18:53:17","func_code":"def swap_keys_values(d):\n return {d[key]: key for key in d}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":15652,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-03 18:53:17","func_code":"def swap_keys_values(d):\n return {d[key]: key for key in d}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":35182,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:53:29","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":28695,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:53:45","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(list(d.items())))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":17865,"user":"f94d128e-c997-4cca-8a7e-2216c3966829","date":"2017-03-03 18:54:29","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":11168,"user":"f94d128e-c997-4cca-8a7e-2216c3966829","date":"2017-03-03 18:54:29","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":32137,"user":"f94d128e-c997-4cca-8a7e-2216c3966829","date":"2017-03-03 18:54:29","func_code":"def swap_unique_keys_values(d):\n values = list(d.values())\n items = [(y, x) for x, y in list(d.items())]\n d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}\n return d2","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":19880,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:55:33","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(collections.OrderedDict(sorted(list(d.items()), key=lambda t: t[0])))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":29351,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:55:54","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = collections.OrderedDict(sorted(list(d.items()), key=lambda t: t[0]))\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":20593,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:56:01","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = collections.OrderedDict(sorted(list(d.items()), key=lambda t: t[0]))\n print(list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":9299,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:56:16","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = sorted(list(d.items()), key=lambda t: t[0])\n print(list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":39650,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:57:37","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = SortedDict(d)\n print(d.items)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":32357,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:58:07","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":3955,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:59:06","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(list(d.items()), key=sorter))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":4150,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 18:59:39","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n for i in a:\n if a.count(i) == 1:\n a.pop(i)\n e = {}\n for k, v in list(d.items()):\n if v not in a:\n e[v] = k\n return e","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":7236,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 18:59:56","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(list(d.items()), key=sorter))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":7932,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:00:19","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":30785,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 19:00:32","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n for i in a:\n if a.count(i) == 1:\n a.remove(i)\n e = {}\n for k, v in list(d.items()):\n if v not in a:\n e[v] = k\n return e","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":42001,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:00:41","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = list(d.items())\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":31985,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:01:28","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":34654,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:02:36","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print([k for k, v in sorted(list(d.items()), key=lambda x: x[1],\n reverse=True)])","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":19677,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:03:02","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print([k for k, v in sorted(list(d.items()), key=lambda x: x[1],\n reverse=True)])","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":13987,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:03:12","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print([k for k, v in sorted(list(d.items()), key=lambda x: x[1])])","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":13698,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:03:28","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(list(d.items()), key=lambda x: x[1]))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":6366,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:04:00","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print([(k, v) for k, v in sorted(list(d.items()), key=lambda x: x[1])])","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":28040,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:04:47","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n sd = sorted(d.items())\n print(sd)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":416,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:05:04","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":13730,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:05:19","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(d))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":35588,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:05:47","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = sorted(d)\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":30891,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:09:15","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n d = sorted(list(d.items()), key=lambda t: t[0])\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":9132,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:11:54","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n new_dict = sorted(list(d.items()), key=lambda t: t[0])\n print(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":21778,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:12:48","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n new_dict = sorted(list(d.items()), key=lambda t: t[0])\n print(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":30246,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:13:09","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n new_dict = sorted(list(d.items()), key=lambda t: t[0])\n print(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":41659,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:13:52","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n new_dict = sorted(list(d.items()), key=lambda t: t[0])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":12167,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:14:06","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n new_dict = sorted(list(d.items()), key=lambda t: t[0])\n print(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":28568,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:14:27","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(new_dict)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":17581,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:14:40","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(d)","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":15842,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:14:59","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))\n print(sorted(list(d.items()), key=lambda t: t[0]))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":17623,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:16:01","func_code":"def swap_keys_values(d):\n d = dict((v, k) for k, v in list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":38590,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:16:13","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":30444,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:16:31","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":10799,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:16:48","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":8251,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 19:16:48","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":33084,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-03 19:34:17","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":4112,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-03 19:34:17","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":2431,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-03 19:37:39","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":22370,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-03 19:37:39","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":31244,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-03 19:37:39","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":19587,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 19:57:05","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n for i in a:\n if 1 < a.count(i):\n a.remove(i)\n e = {}\n for k, v in list(d.items()):\n if v in a:\n e[v] = k\n return e","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":26360,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-03 20:00:37","func_code":"def swap_keys_values(d):\n new_d = d((v, k) for k, v in list(d.items()))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":24817,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-03 20:00:37","func_code":"def swap_keys_values(d):\n new_d = d((v, k) for k, v in list(d.items()))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":31150,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-03 20:00:37","func_code":"def swap_keys_values(d):\n new_d = d((v, k) for k, v in list(d.items()))\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":24384,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 20:03:02","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n for i in a:\n if 1 < a.count(i):\n a = [j for j in a if j != i]\n e = {}\n for k, v in list(d.items()):\n if v in a:\n e[v] = k\n return e","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":12227,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 20:03:02","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n for i in a:\n if 1 < a.count(i):\n a = [j for j in a if j != i]\n e = {}\n for k, v in list(d.items()):\n if v in a:\n e[v] = k\n return e","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":30059,"user":"15c8870d-4f5a-4578-b0fb-4dd4a4402626","date":"2017-03-03 20:03:02","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n for i in a:\n if 1 < a.count(i):\n a = [j for j in a if j != i]\n e = {}\n for k, v in list(d.items()):\n if v in a:\n e[v] = k\n return e","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":23823,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 20:37:36","func_code":"def swap_unique_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":8743,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-03 20:38:15","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":35510,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-03 20:38:15","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":2874,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-03 20:38:59","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":12075,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-03 20:38:59","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":18932,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 20:53:20","func_code":"def swap_unique_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":39367,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 20:54:48","func_code":"def swap_unique_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n new_dict.pop(7, None)\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":12962,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 20:54:48","func_code":"def swap_unique_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n new_dict.pop(7, None)\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":29233,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-03-03 20:54:48","func_code":"def swap_unique_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n new_dict.pop(7, None)\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":6172,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-03 21:18:33","func_code":"def swap_keys_values(d):\n new_dict = dict((k, v) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":7577,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-03 21:20:06","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":13062,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-03 21:20:06","func_code":"def swap_keys_values(d):\n new_dict = dict((v, k) for k, v in list(d.items()))\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":3133,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-03 21:24:24","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":3576,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-03 21:24:24","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":23363,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-03 21:31:22","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":28910,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-03 21:31:22","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":15592,"user":"7f7b8266-dd5b-41e4-86a0-07e112b10147","date":"2017-03-03 21:32:46","func_code":"def swap_keys_values(my_dict):\n new_dict = {}\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":39914,"user":"7f7b8266-dd5b-41e4-86a0-07e112b10147","date":"2017-03-03 21:32:46","func_code":"def swap_keys_values(my_dict):\n new_dict = {}\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":17538,"user":"7f7b8266-dd5b-41e4-86a0-07e112b10147","date":"2017-03-03 21:32:46","func_code":"def swap_keys_values(my_dict):\n new_dict = {}\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":15402,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-03 21:34:14","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":27133,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-03 21:34:14","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":26747,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-03 21:49:53","func_code":"def swap_keys_values(my_dict):\n new_dict = {}\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":31572,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-03 21:49:53","func_code":"def swap_keys_values(my_dict):\n new_dict = {}\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":40925,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 22:08:24","func_code":"def swap_keys_values(d):\n for c in d:\n tmp == d[key]\n d[key] == value\n value == tmp\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":14411,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 22:09:31","func_code":"def swap_keys_values(d):\n tmp = ''\n for c in d:\n tmp = d[key]\n d[key] = value\n value = tmp\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":33650,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-03 22:27:35","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":13864,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-03 22:27:35","func_code":"def swap_keys_values(d):\n d = {v: k for k, v in list(d.items())}\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":31118,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-03 22:28:31","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":28079,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-03 22:28:31","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":27314,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-03 22:28:31","func_code":"def swap_unique_keys_values(d):\n keys = [k for k in list(d.keys())]\n vals = [v for v in list(d.values())]\n dd = {}\n for i in range(0, len(vals)):\n if vals.count(vals[i]) == 1:\n dd[vals[i]] = keys[i]\n return dd","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":38398,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-03 22:51:22","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":1757,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-03 22:52:41","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":18570,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-03 22:52:41","func_code":"def swap_keys_values(d):\n new_dict = dict([(v, k) for k, v in list(d.items())])\n return new_dict","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":41188,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-03 22:55:12","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = {}\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":34617,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-03 22:56:04","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = {}\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":38000,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-03 22:58:22","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = {}\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":271,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-03 23:01:34","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":27771,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-03 23:01:34","func_code":"def swap_unique_keys_values(d):\n c = {}\n e = []\n r = {}\n seen = {}\n for value in list(d.values()):\n if value not in c:\n c[value] = 1\n else:\n c[value] = c[value] + 1\n for keys, values in list(c.items()):\n if values == 2:\n e.append(keys)\n del values\n for key in e:\n for value in list(d.items()):\n if key not in value:\n r[value[0]] = value[1]\n my_dict = r\n new_dict = {v: k for k, v in list(my_dict.items())}\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":14871,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-03 23:04:21","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":11580,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-03 23:06:00","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":13,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-03 23:06:00","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d[k]\n if v not in new_dict:\n new_dict[v] = k\n else:\n del new_dict[v]\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":3132,"user":"109505d5-be18-4a61-8318-5d522de4300e","date":"2017-03-03 23:21:03","func_code":"def swap_keys_values(d):\n swapped = {}\n for k, v in list(d.items()):\n swapped[v] = k\n return swapped","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":37115,"user":"109505d5-be18-4a61-8318-5d522de4300e","date":"2017-03-03 23:21:03","func_code":"def swap_keys_values(d):\n swapped = {}\n for k, v in list(d.items()):\n swapped[v] = k\n return swapped","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":14853,"user":"109505d5-be18-4a61-8318-5d522de4300e","date":"2017-03-03 23:21:03","func_code":"def swap_keys_values(d):\n swapped = {}\n for k, v in list(d.items()):\n swapped[v] = k\n return swapped","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":19893,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 23:23:24","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in d.items]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":12977,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 23:24:31","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":33952,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 23:24:31","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":18642,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-03 23:25:05","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":31617,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-03 23:25:05","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":3140,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 23:30:03","func_code":"def swap_keys_values():\n a = [v for k, v in list(d.items())]\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":40608,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 23:30:53","func_code":"def swap_keys_values(d):\n a = [v for k, v in list(d.items())]\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":26486,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-03 23:30:53","func_code":"def swap_keys_values(d):\n a = [v for k, v in list(d.items())]\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":26313,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:16:19","func_code":"def swap_unique_keys_values(d):\n n_d = {}\n dup = []\n for k in d:\n if k in n_d:\n dup.append(k)\n n_d[d[k]] = k\n for d in dup:\n n_d.pop(d)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":42391,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:16:51","func_code":"def swap_unique_keys_values(d):\n print(d)\n n_d = {}\n dup = []\n for k in d:\n if k in n_d:\n dup.append(k)\n n_d[d[k]] = k\n print(dup)\n for d in dup:\n n_d.pop(d)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37241,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:17:08","func_code":"def swap_unique_keys_values(d):\n print(d)\n n_d = {}\n dup = []\n for k in d:\n if k in n_d:\n dup.append(k)\n n_d[d[k]] = k\n print(dup)\n for d in dup:\n n_d.pop(d)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":2475,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:18:58","func_code":"def swap_unique_keys_values(d):\n print(d)\n n_d = {}\n dup = []\n for k in d:\n if d[k] in n_d:\n dup.append(k)\n n_d[d[k]] = k\n print(dup)\n for x in dup:\n n_d.pop(x)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":1647,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:19:21","func_code":"def swap_unique_keys_values(d):\n print(d)\n n_d = {}\n dup = []\n for k in d:\n if d[k] in n_d:\n dup.append(d[k])\n n_d[d[k]] = k\n print(dup)\n for x in dup:\n n_d.pop(x)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":10790,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:19:38","func_code":"def swap_unique_keys_values(d):\n n_d = {}\n dup = []\n for k in d:\n if d[k] in n_d:\n dup.append(d[k])\n n_d[d[k]] = k\n for x in dup:\n n_d.pop(x)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":34990,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-06 12:19:38","func_code":"def swap_unique_keys_values(d):\n n_d = {}\n dup = []\n for k in d:\n if d[k] in n_d:\n dup.append(d[k])\n n_d[d[k]] = k\n for x in dup:\n n_d.pop(x)\n return n_d","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":30980,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-06 13:56:23","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":14174,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-06 13:56:23","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":29846,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-06 13:57:38","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":41451,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-06 13:57:38","func_code":"def swap_unique_keys_values(d):\n new_dict = {}\n for k in d:\n v = d.get(k)\n if v in new_dict:\n del new_dict[v]\n else:\n new_dict[v] = k\n return new_dict","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":2898,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 17:38:21","func_code":"def swap_keys_values(d):\n for k, v in d.items:\n new_v, new_k = k, v\n return new_v, new_k","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":false} +{"submission_id":9285,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 17:54:25","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":34881,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 17:54:25","func_code":"def swap_keys_values(d):\n return {v: k for k, v in list(d.items())}","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":10284,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 18:06:13","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in d.items]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":4902,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 18:09:30","func_code":"def swap_unique_keys_values(d):\n a = []\n for k, v in d.items:\n a.append(v)\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":7460,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 18:10:16","func_code":"def swap_unique_keys_values(d):\n a = []\n for k, v in list(d.items()):\n a.append(v)\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":19992,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 18:12:03","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":22746,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-06 18:12:03","func_code":"def swap_unique_keys_values(d):\n a = [v for k, v in list(d.items())]\n b = [c for c in a if a.count(c) == 1]\n return {v: k for k, v in list(d.items()) if v in b}","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":11786,"user":"fac2ee37-8224-43e0-9c23-7cc249889343","date":"2017-03-07 12:57:17","func_code":"def swap_keys_values(x):\n d = {}\n for k, v in list(x.items()):\n d[v] = k\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":30301,"user":"fac2ee37-8224-43e0-9c23-7cc249889343","date":"2017-03-07 12:57:17","func_code":"def swap_keys_values(x):\n d = {}\n for k, v in list(x.items()):\n d[v] = k\n return d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":27365,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-08 14:43:48","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18583,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-08 14:44:27","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18575,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-08 14:44:53","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":39333,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-08 14:44:53","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":9148,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-08 14:45:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if d < r1 + r2:\n return True\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":30326,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-08 14:45:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if d < r1 + r2:\n return True\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":36915,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 11:16:35","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":39422,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 11:19:36","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":9529,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 11:19:36","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":28064,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-03-10 11:28:08","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":27601,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-03-10 11:28:08","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":19312,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-03-10 11:31:30","func_code":"def append2list(l1, l2=[]):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11570,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-03-10 11:31:30","func_code":"def append2list(l1, l2=[]):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":22932,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-10 11:32:32","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":20004,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-03-10 11:34:08","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":28901,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-03-10 11:34:08","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":1452,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-10 11:34:30","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":22298,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-10 11:35:24","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13174,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-03-10 11:36:21","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":7739,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-03-10 11:36:21","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":27378,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:36:57","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":10129,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-03-10 11:37:16","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n rd = r1 + r2\n if d < rd:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":38387,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-03-10 11:37:28","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":12880,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-03-10 11:37:28","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25463,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:38:09","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":12597,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:38:40","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":41113,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:40:20","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18342,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:40:36","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":33335,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 11:42:04","func_code":"def append2list(l1, l2=[]):\n return l1 + l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":38864,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-10 11:43:58","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":28187,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-10 11:43:58","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":12024,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-10 11:44:52","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31935,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-10 11:44:52","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":14146,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-03-10 11:46:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n print(distance)\n if distance >= r1 + r2:\n return False\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":16709,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:46:45","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":33560,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 11:46:55","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11420,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 11:46:55","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18099,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-10 11:47:05","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":17859,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-10 11:47:05","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40539,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-03-10 11:47:10","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n if distance >= r1 + r2:\n return False\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":8593,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-10 11:47:50","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23894,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-10 11:47:50","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25169,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-03-10 11:48:27","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":37311,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-03-10 11:48:27","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":7248,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 11:48:27","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":2241,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 11:48:39","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13991,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-10 11:48:39","func_code":"def append2list(l1, l2=[]):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13998,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-10 11:49:53","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":34403,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-10 11:50:46","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":9066,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-10 11:50:46","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":39208,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-03-10 11:51:13","func_code":"def append2list(l2, l1=None):\n if l1 == None:\n l1 = []\n for i in l2:\n l1.append(i)\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":34762,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-03-10 11:51:13","func_code":"def append2list(l2, l1=None):\n if l1 == None:\n l1 = []\n for i in l2:\n l1.append(i)\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11830,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-10 11:51:51","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11298,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-10 11:51:51","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18028,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 11:52:17","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":30010,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 11:52:17","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":9970,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:52:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if r1 + r2 < distance:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":40436,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-03-10 11:52:59","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = math.sqrt((x2 - x1) ** 2 + (y2 + y1) ** 2)\n r = r1 + r2\n return d < r","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":7945,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-03-10 11:53:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n A = False\n sumrad = r1 + r2\n xs = (x2 - x1) ** 2\n ys = (y2 - y1) ** 2\n inside = xs + ys\n dis = math.sqrt(inside)\n if dis < sumrad:\n return True\n elif sumrad < dis:\n return A\n elif sumrad == dis:\n return A","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":13485,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-03-10 11:53:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n A = False\n sumrad = r1 + r2\n xs = (x2 - x1) ** 2\n ys = (y2 - y1) ** 2\n inside = xs + ys\n dis = math.sqrt(inside)\n if dis < sumrad:\n return True\n elif sumrad < dis:\n return A\n elif sumrad == dis:\n return A","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":34574,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:53:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if r1 + r2 <= distance:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":29835,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:53:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if r1 + r2 <= distance:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":4370,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-10 11:54:01","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11441,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-10 11:54:22","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18202,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-10 11:54:29","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 == []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":33414,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-03-10 11:54:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (y2 - y1) ** 2 + (x2 - x1) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":26347,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-03-10 11:54:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (y2 - y1) ** 2 + (x2 - x1) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":35996,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-03-10 11:54:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (y2 - y1) ** 2 + (x2 - x1) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":9041,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-03-10 11:54:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) * (x2 - x1)\n y = (y2 - y1) * (y2 - y1)\n xy = x + y\n D = math.sqrt(xy)\n return D","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":24672,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-03-10 11:54:58","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n r = r1 + r2\n return d < r","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":26597,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-03-10 11:54:58","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n r = r1 + r2\n return d < r","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":22191,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 11:55:01","func_code":"def overlap(x1=0, y1=0, r1=1, x2=1, y2=1, r2=1):\n distance_centre = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n distance_radius = (r1 + r2) * (r1 + r2)\n if distance_centre < distance_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":21861,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-10 11:55:11","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":32117,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-10 11:55:11","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13592,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-10 11:55:15","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":16054,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-10 11:55:15","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":4875,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:55:22","func_code":"def append2list(l1, l2=[]):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23928,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:55:31","func_code":"def append2list(l1, l2=[]):\n if l2 == ' ':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":41214,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 11:55:48","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n abs(r1 - r2) <= ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 <= (r1 + r2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":5621,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-03-10 11:55:55","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) * (x2 - x1)\n y = (y2 - y1) * (y2 - y1)\n xy = x + y\n D = math.sqrt(xy)\n if D >= r1 + r2:\n print(False)\n else:\n print(True)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":13696,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-10 11:56:04","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23961,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-03-10 11:56:04","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":32203,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 11:56:09","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n return abs(r1 - r2) <= ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 <= (r1 + r2\n ) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":25800,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-03-10 11:56:11","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n rd = r1 + r2\n if d < rd:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":6498,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-03-10 11:56:11","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n rd = r1 + r2\n if d < rd:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":160,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:56:14","func_code":"def append2list(l1, l2=[]):\n if l2 == ' ':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18089,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-10 11:56:24","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":29749,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-10 11:56:24","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":14822,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-03-10 11:56:32","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) * (x2 - x1)\n y = (y2 - y1) * (y2 - y1)\n xy = x + y\n D = math.sqrt(xy)\n if D >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":9767,"user":"336d0cd0-002e-4296-ba45-582077aac4a4","date":"2017-03-10 11:56:32","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) * (x2 - x1)\n y = (y2 - y1) * (y2 - y1)\n xy = x + y\n D = math.sqrt(xy)\n if D >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":36390,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:56:47","func_code":"def append2list(l1, l2=[]):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13407,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:57:22","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":4490,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-03-10 11:57:22","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":16728,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 11:57:41","func_code":"def append2list(l1, l2=[]):\n for i in l2:\n l1.append(i)\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":14304,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 11:58:20","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n print(dist < r1 + r2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":19255,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 11:58:33","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n return abs(r1 - r2) <= ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 and ((\n x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 <= (r1 + r2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":6883,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 11:58:33","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n return abs(r1 - r2) <= ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 and ((\n x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 <= (r1 + r2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":42018,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 11:58:42","func_code":"def append2list(l1, l2=[]):\n for i in l2[::-1]:\n l1.append(i)\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":36545,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-10 11:59:03","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25758,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 11:59:13","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n print(dist < r1 + r2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":24893,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-10 11:59:36","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":20907,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-10 11:59:47","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":38688,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 11:59:56","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":1278,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 11:59:56","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":36514,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 12:00:19","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n print((x1, y1, r1, x2, y2, r2))\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n print(dist < r1 + r2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":14136,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-10 12:00:21","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":6710,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-10 12:00:21","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":19671,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:00:22","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25502,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 12:00:52","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n print((x1, y1, r1, x2, y2, r2))\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":155,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:01:02","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":19333,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:01:02","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":3476,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 12:01:03","func_code":"def append2list(l1, l2=[]):\n return l1 + l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":17721,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:01:19","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":3306,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-10 12:01:20","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":27269,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-10 12:01:20","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":27647,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:01:32","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":1263,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-03-10 12:01:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n if distance >= r1 + r2:\n return False\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":36228,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-03-10 12:01:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n if distance >= r1 + r2:\n return False\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":30890,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:02:08","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":39966,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-10 12:02:28","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":33104,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-10 12:02:28","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":6657,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:02:38","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":9264,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:02:57","func_code":"def append2list(l1, l2=[]):\n for i in l2:\n l1.append(i)\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":16043,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 12:03:09","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n l1 = l1.clear()\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":9280,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 12:03:09","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n l1 = l1.clear()\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":933,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-10 12:03:09","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n l1 = l1.clear()\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18237,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-10 12:03:49","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n return (x1 - x2) ** 2 + (y1 - y2) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":23272,"user":"5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0","date":"2017-03-10 12:03:49","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n return (x1 - x2) ** 2 + (y1 - y2) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":6162,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:03:50","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18814,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 12:03:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n print(dist < r1 + r2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":32579,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-03-10 12:03:53","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":29927,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-03-10 12:03:53","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":36647,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:04:26","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":20834,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:04:57","func_code":"def append2list(l1=[], l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":41797,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 12:05:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":15868,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-03-10 12:05:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n from math import sqrt\n dist = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":7007,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:05:36","func_code":"def append2list(d1=[], d2=[]):\n for i in d1:\n d2.append(i)\n return d2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":34602,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 12:06:02","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":21717,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 12:06:02","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18724,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:07:55","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13504,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:07:55","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":26735,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:07:58","func_code":"def append2list(l1=[], l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23997,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:08:34","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":377,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:08:34","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":33655,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-10 12:09:06","func_code":"def append2list(l1, l2=[]):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":20167,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-03-10 12:09:06","func_code":"def append2list(l1, l2=[]):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":8870,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 12:09:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=1, y2=1, r2=1):\n distance_centre = int(sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))\n distance_radius = r1 + r2\n if distance_centre < distance_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":10895,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 12:09:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=1, y2=1, r2=1):\n distance_centre = int(sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))\n distance_radius = r1 + r2\n if distance_centre < distance_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":6596,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-10 12:09:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=1, y2=1, r2=1):\n distance_centre = int(sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))\n distance_radius = r1 + r2\n if distance_centre < distance_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":27720,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:10:08","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":17856,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:10:08","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":37984,"user":"d2e09b87-6673-4e12-97a7-4a861a6daa84","date":"2017-03-10 12:10:58","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":27613,"user":"d2e09b87-6673-4e12-97a7-4a861a6daa84","date":"2017-03-10 12:10:58","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":16314,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-10 12:11:22","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":20029,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 12:11:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n distance = (x * x + y * y) ** 0.5\n return r > distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":15531,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 12:12:47","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n return r1 + r2 > distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":3516,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-03-10 12:12:47","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n return r1 + r2 > distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":19864,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-10 12:13:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n hypotenuse = (x ** 2 + y ** 2) ** 0.5\n return r > hypotenuse","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":38778,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-03-10 12:13:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n hypotenuse = (x ** 2 + y ** 2) ** 0.5\n return r > hypotenuse","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":2919,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-10 12:13:14","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25939,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-10 12:13:14","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":2262,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-03-10 12:13:58","func_code":"def append2list(l1, l2=None):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11011,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-03-10 12:13:58","func_code":"def append2list(l1, l2=None):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":34009,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 12:15:02","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n circles = (x2 - x1) ** 2 + (y2 - y1) ** 2\n distance = circles ** 1 \/ 2\n length = r1 + r2\n if distance <= length:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":35217,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 12:16:05","func_code":"def dist(x1, y1, x2, y2):\n return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return r1 + r2 > dist(x1, y1, x2, y2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":33361,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-03-10 12:16:05","func_code":"def dist(x1, y1, x2, y2):\n return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return r1 + r2 > dist(x1, y1, x2, y2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":12354,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-10 12:17:55","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if r1 + r2 <= sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2):\n return False\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":38169,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-03-10 12:17:55","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if r1 + r2 <= sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2):\n return False\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":205,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:18:46","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) \/\/ 2\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":32027,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-10 12:18:58","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if x2 is _A:\n x2 = 0\n if r1 is _A:\n r1 = 1\n if y2 is _A:\n y2 = 0\n if y1 is _A:\n y1 = 0\n if r2 is _A:\n r2 = 1\n if (x2 - x1) ** 2 + (y2 - y1) ** 2 >= (r1 + r2) ** 2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":9740,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-03-10 12:18:58","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if x2 is _A:\n x2 = 0\n if r1 is _A:\n r1 = 1\n if y2 is _A:\n y2 = 0\n if y1 is _A:\n y1 = 0\n if r2 is _A:\n r2 = 1\n if (x2 - x1) ** 2 + (y2 - y1) ** 2 >= (r1 + r2) ** 2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":41149,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 12:19:12","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n circles = (x2 - x1) ** 2 + (y2 - y1) ** 2\n distance = circles ** 1 \/ 2\n length = r1 + r2\n if distance < length:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":5238,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:19:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) \/\/ 2\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":16243,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:19:58","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p < dist_r:\n print(True)\n else:\n print(False)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":12742,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-10 12:20:22","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18113,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:20:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) \/\/ 2\n print(diatance)\n print(r1)\n print(r2)\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":668,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:20:48","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) \/\/ 2\n print(distance)\n print(r1)\n print(r2)\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":30979,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:20:48","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":29973,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-03-10 12:21:08","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":20723,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-03-10 12:21:08","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":40108,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:21:14","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":32566,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-10 12:21:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n distance = (x ** 2 + y ** 2) ** 0.5\n return r > distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":2904,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-03-10 12:21:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n distance = (x ** 2 + y ** 2) ** 0.5\n return r > distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":12900,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-10 12:22:20","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40928,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-10 12:22:29","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":36863,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:22:29","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p <= dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":29591,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-10 12:23:29","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":5644,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:23:55","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n return r == d","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":142,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-10 12:24:00","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":24486,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-10 12:24:00","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":33068,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:24:20","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n return d >= r or d < r","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":1469,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:25:16","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n print(distance)\n print(r1)\n print(r2)\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":4587,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-10 12:25:17","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":26049,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-10 12:25:17","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":10097,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-10 12:25:17","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":32425,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:26:21","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n print(distance)\n print(r1 + r2)\n print(r1 - r2)\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":33449,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:26:33","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n return r != d","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":28584,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-10 12:26:36","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for item in l1:\n l2.append(item)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":39794,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-10 12:26:36","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for item in l1:\n l2.append(item)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":37428,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:27:01","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n if d >= r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":41427,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:27:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":36908,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:28:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n if d >= r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":7087,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:28:10","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":665,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:28:35","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n return d >= r or d < r","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":24137,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-10 12:28:46","func_code":"def append2list(l1, l2=''):\n if l2 == '':\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":29957,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:28:53","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n return d >= r or d < r","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":40836,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:29:32","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p <= dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":9866,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:29:34","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n if d >= r:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":37890,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-03-10 12:29:34","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n r = r1 + r2\n if d >= r:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":21830,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:29:50","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n print('{} {} {} {} {} {}'.format(x1, y1, r1, x2, y2, r2))\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance:\n return True\n elif r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":36167,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 12:30:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n circles = (x2 - x1) ** 2 + (y2 - y1) ** 2\n distance = math.sqrt(circles)\n length = r1 + r2\n if distance < length:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":14173,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 12:30:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n circles = (x2 - x1) ** 2 + (y2 - y1) ** 2\n distance = math.sqrt(circles)\n length = r1 + r2\n if distance < length:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":1487,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-03-10 12:30:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n circles = (x2 - x1) ** 2 + (y2 - y1) ** 2\n distance = math.sqrt(circles)\n length = r1 + r2\n if distance < length:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":32716,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:31:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance or r1 - r2 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":26670,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:32:11","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":39627,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:32:11","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":20946,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-10 12:32:11","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":22724,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:32:28","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance or r2 - r1 == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":21695,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-10 12:33:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":13320,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-03-10 12:33:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":11915,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:33:18","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":1527,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 12:33:32","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":29838,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-10 12:33:49","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n l2.append(l1)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":21534,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:34:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2\n rneg = r1 - r2\n if d == rpos:\n return True\n elif d != rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":10542,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-10 12:34:06","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n distance = (x ** 2 + y ** 2) ** 0.5\n return r > distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":10699,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-10 12:34:06","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n distance = (x ** 2 + y ** 2) ** 0.5\n return r > distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":1309,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-03-10 12:34:06","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = x2 - x1\n y = y2 - y1\n r = r1 + r2\n distance = (x ** 2 + y ** 2) ** 0.5\n return r > distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":3962,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:34:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = abs((x2 - x1) ** 2)\n y = abs((y2 - y1) ** 2)\n distance = (x + y) \/\/ 2\n if r1 + r2 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":38114,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:34:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2\n rneg = r1 - r2\n if d == rpos:\n return True\n elif d == rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":39436,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 12:34:50","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":26083,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:34:58","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":33409,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-10 12:34:58","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(l1)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":36055,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-10 12:35:10","func_code":"def overlap(x1=0, x2=0, r1=1, y1=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n return distance < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":23633,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-10 12:35:38","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40046,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-10 12:35:38","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":22545,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 12:35:51","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":26445,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-10 12:37:36","func_code":"def overlap(x1=0, x2=0, r1=1, y1=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":37897,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-10 12:37:57","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":28652,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:38:49","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 == distance or abs(r1 - r2) == distance and distance < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":13914,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:39:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 == distance or abs(r1 - r2) == distance and distance <= r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":9681,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-10 12:39:42","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":4261,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-10 12:39:42","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":17068,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-03-10 12:39:42","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":11008,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:39:54","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2 - 1\n rneg = r1 - r2 + 1\n if d == rpos:\n return True\n elif d == rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":19917,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:40:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2 - 1\n rneg = r1 - r2\n if d == rpos:\n return True\n elif d == rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":35862,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:41:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if (r1 + r2 == distance or abs(r1 - r2) == distance\n ) and distance <= r1 + r2 - 1:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":23015,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:41:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if (r1 + r2 == distance or abs(r1 - r2) == distance\n ) and distance == r1 + r2 - 1:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":20823,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:42:19","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if (r1 + r2 == distance or abs(r1 - r2) == distance\n ) and distance == r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":14492,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-10 12:42:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":34084,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-03-10 12:42:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return dis","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":4075,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:42:40","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if (r1 + r2 == distance or abs(r1 - r2) == distance\n ) and distance <= r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":34687,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:43:57","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":27519,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-10 12:44:12","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":18091,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-10 12:44:12","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":3047,"user":"fa2c47e6-9c25-4040-9985-e5ab62711be6","date":"2017-03-10 12:44:12","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":22285,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:45:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2 + 1) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":11331,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-10 12:45:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":13107,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-03-10 12:45:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":36458,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-10 12:45:12","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":35470,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-03-10 12:45:12","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":12436,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:46:45","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":28477,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:47:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2 - 1\n rneg = r1 - r2\n if d == rpos:\n return True\n elif d == rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":5669,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-10 12:47:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2 - 1\n rneg = r1 - r2\n if d == rpos:\n return True\n elif d == rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":30584,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:47:55","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2 - 1) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":19976,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:48:08","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":5765,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:48:08","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":28806,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-10 12:48:08","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":2291,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 12:50:59","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) < (r1 + r2) * (r1 + r2\n )","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":23937,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-10 12:53:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n return distance < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":2287,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-03-10 12:53:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n return distance < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":42204,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-10 13:05:56","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":7191,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:09:02","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":1677,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:09:02","func_code":"def append2list(l1, l2=[]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31937,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-10 13:17:16","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":20307,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-10 13:17:16","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":1015,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:30:19","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n r = r1 + r2\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n l = (x + y) ** 1 \/ 2\n return l < r","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":3303,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:30:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n r = r1 + r2\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n l = (x + y) ** 1 \/ 2\n return l <= r","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":19346,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:31:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n r = r1 + r2\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n l = (x + y) ** 0.5\n return l <= r","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":20884,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:31:23","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n r = r1 + r2\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n l = (x + y) ** 0.5\n return l < r","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":12387,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-03-10 13:31:23","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n r = r1 + r2\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n l = (x + y) ** 0.5\n return l < r","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":707,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:43:51","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":32498,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:48:12","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n print(l2)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":14114,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:48:41","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n print(l2)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23459,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:55:36","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n ls = []\n for i in l1:\n l2.append(i)\n print(l2)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13491,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:56:21","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n print(l2)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":33353,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:56:38","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40760,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 14:56:38","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":22363,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 15:06:24","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) < (r1 + r2) * (r1 + r2):\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":11030,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 15:08:01","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n elif y1 is _A:\n y1 = 0\n elif r1 is _A:\n r1 = 1\n if (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) < (r1 + r2) * (r1 + r2):\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":19581,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 15:12:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) < (r1 + r2) * (r1 + r2):\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":23304,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-03-10 15:12:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) < (r1 + r2) * (r1 + r2):\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":21589,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-10 15:18:49","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25974,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-10 15:21:49","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":36897,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-10 15:26:55","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":10039,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-10 15:26:55","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":33746,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-03-10 15:52:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":15661,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-03-10 15:52:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":15144,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-03-10 15:54:05","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31453,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-03-10 15:54:05","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":39727,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-03-10 16:59:38","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":24520,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-03-10 16:59:38","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":6164,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-03-10 17:07:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rdistance = r1 + r2\n cdistance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if cdistance < rdistance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":21097,"user":"3328e1f8-ae85-4d26-8d1c-386e7e2467dc","date":"2017-03-10 17:07:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rdistance = r1 + r2\n cdistance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if cdistance < rdistance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":20216,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-10 18:01:07","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":41669,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-10 18:03:12","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":10066,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-10 18:06:26","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18016,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-10 18:06:26","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25782,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-10 19:59:50","func_code":"def append2list(l1, l2=None):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":5111,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-10 19:59:50","func_code":"def append2list(l1, l2=None):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":38860,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-10 19:59:50","func_code":"def append2list(l1, l2=None):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23629,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-03-10 22:31:40","func_code":"def append2list(l1, l2=[]):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11282,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-03-10 22:31:40","func_code":"def append2list(l1, l2=[]):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40789,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-03-10 23:12:32","func_code":"def append2list(l1, l2=None):\n l2 = l2 or []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":1625,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-03-10 23:12:32","func_code":"def append2list(l1, l2=None):\n l2 = l2 or []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":28838,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-03-10 23:18:23","func_code":"def distance(x1, y1, x2, y2):\n return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y=0, r2=1):\n return distance(x1, y1, x2, y2) < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":32256,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-03-10 23:18:41","func_code":"def distance(x1, y1, x2, y2):\n return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return distance(x1, y1, x2, y2) < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":17191,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-03-10 23:18:41","func_code":"def distance(x1, y1, x2, y2):\n return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return distance(x1, y1, x2, y2) < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":22848,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-11 00:09:58","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n c = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if c > r1:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":12517,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-11 00:10:42","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n c = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if c > r1 or c > r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":30971,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-11 00:11:00","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n c = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if c > r1:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":15179,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-11 00:15:40","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n c = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if c > r1 and c > r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":20288,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-11 00:15:40","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n c = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if c > r1 and c > r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":39244,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-03-11 00:15:40","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1\n c = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if c > r1 and c > r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":33701,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-11 15:22:39","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":3620,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-11 15:22:39","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":44,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-11 16:46:44","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25031,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-11 17:00:07","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":202,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-11 17:00:07","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":7585,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-11 17:11:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":32332,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-03-11 17:11:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":36343,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-11 18:38:31","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":16829,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-11 18:41:26","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23656,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-11 18:41:26","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11871,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-11 18:51:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return bool(math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":27784,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-11 18:51:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return bool(math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":12920,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:50:22","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":25902,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:50:22","func_code":"def search(list, num):\n i = 0\n while i < len(list):\n if list[i] == num:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"funcs.py_ca278_search","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21953,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:50:22","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":15745,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:50:22","func_code":"def print_keys(dict):\n for key in dict:\n print(key)","func_name":"print_keys","assignment_id":"funcs.py_ca278_print_keys","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33700,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:50:22","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 10\n else:\n return 7","func_name":"get_price","assignment_id":"funcs.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34248,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:50:22","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":true} +{"submission_id":27791,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 10\n else:\n return 7","func_name":"get_price","assignment_id":"funcs.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":25367,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33527,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11255,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3092,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def print_keys(dict):\n for key in dict:\n print(key)","func_name":"print_keys","assignment_id":"funcs.py_ca278_print_keys","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":4043,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":16931,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":true} +{"submission_id":244,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def print_keys(dict):\n for key in dict:\n print(key)","func_name":"print_keys","assignment_id":"funcs.py_ca278_print_keys","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23585,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 10\n else:\n return 7","func_name":"get_price","assignment_id":"funcs.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def print_keys(dict):\n for key in dict:\n print(key)","func_name":"print_keys","assignment_id":"funcs.py_ca278_print_keys","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":2860,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":true} +{"submission_id":201,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def search(list, num):\n i = 0\n while i < len(list):\n if list[i] == num:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"funcs.py_ca278_search","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6848,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":true} +{"submission_id":31050,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 10\n else:\n return 7","func_name":"get_price","assignment_id":"funcs.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28981,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":91,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def search(list, num):\n i = 0\n while i < len(list):\n if list[i] == num:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"funcs.py_ca278_search","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15712,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":3693,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-11 21:53:19","func_code":"def search(list, num):\n i = 0\n while i < len(list):\n if list[i] == num:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"funcs.py_ca278_search","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":69,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-12 01:05:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":31439,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-03-12 01:05:07","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":37494,"user":"3a14771a-b55c-44f8-97ab-0376389e494c","date":"2017-03-12 10:56:24","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23920,"user":"3a14771a-b55c-44f8-97ab-0376389e494c","date":"2017-03-12 10:56:24","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23539,"user":"3a14771a-b55c-44f8-97ab-0376389e494c","date":"2017-03-12 10:56:24","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":16196,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-12 13:35:33","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13828,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-12 13:35:33","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":19342,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-12 13:35:33","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":8158,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-12 18:52:36","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":32359,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-12 18:52:36","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":20378,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-12 19:21:46","func_code":"def distance_between_points(x1, y1, x2, y2):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = distance_between_points(x1, y1, x2, y2)\n return distance < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":3900,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-12 19:58:44","func_code":"def distance_between_points(x1, y1, x2, y2):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = distance_between_points(x1, y1, x2, y2)\n return distance < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":19191,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-03-12 19:58:44","func_code":"def distance_between_points(x1, y1, x2, y2):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = distance_between_points(x1, y1, x2, y2)\n return distance < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":12776,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 09:21:36","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n dist = math.sqrt(x2 - x1) ** 2 + (y2 - y1) ** 2\n if dist < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":14775,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-03-13 09:29:18","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":9153,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-03-13 09:38:52","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":1516,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-03-13 09:38:52","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40490,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-03-13 09:51:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":35664,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-03-13 09:51:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":26018,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:24:11","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2) ** 0.5 + (y2 - y1) ** 2\n if dist < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":13438,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:25:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2) ** 0.5 + (y2 - y1) ** 2\n if dist < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":7339,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:25:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2) ** 0.5 + (y2 - y1) ** 2\n if dist <= r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":3675,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:25:42","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2) ** 0.5 + (y2 - y1) ** 2\n if dist < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":14313,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:30:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = (x2 - x1) ** 2 + (y2 - y1) ** 2\n dist2 = dist ** 0.5\n if dist2 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":22279,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:30:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = (x2 - x1) ** 2 + (y2 - y1) ** 2\n dist2 = dist ** 0.5\n if dist2 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":20624,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:39:49","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25472,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:43:31","func_code":"def append2list(w, alist=[]):\n alist.append(w)\n return alist","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":22578,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:43:52","func_code":"def append2list(w, alist=[]):\n alist.append(w)\n return alist","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":11530,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:44:23","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":5168,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:48:04","func_code":"def append2list(l1, l2=None):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":8295,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:49:47","func_code":"def append2list(l1, l2=None):\n for i in l1:\n if l2 is None:\n l2 = []\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":19027,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-03-13 11:49:47","func_code":"def append2list(l1, l2=None):\n for i in l1:\n if l2 is None:\n l2 = []\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":29961,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:30:17","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":27527,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:31:50","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":18853,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:34:28","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n dist_r = (r1 + r2) ** 2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":31346,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:36:52","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist_p1 = (x2 - x1) ** 2\n dist_p2 = (y2 - y1) ** 2\n dist_p = (dist_p1 + dist_p2) ** (1 \/ 2)\n dist_r = r1 + r2\n if dist_p < dist_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":17729,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:40:11","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n dist = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":17330,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:40:46","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":39107,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:40:46","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":33905,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-03-13 12:40:46","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":39830,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-13 16:06:35","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":26529,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-13 16:06:35","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":27275,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-13 16:13:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rad = (r1 + r2) ** 2\n xs = (x1 - x2) ** 2\n ys = (y1 - y2) ** 2\n both_x_y = xs + ys\n if rad > both_x_y:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":6546,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-03-13 16:13:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rad = (r1 + r2) ** 2\n xs = (x1 - x2) ** 2\n ys = (y1 - y2) ** 2\n both_x_y = xs + ys\n if rad > both_x_y:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":20924,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-03-13 18:40:01","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":38248,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-03-13 18:40:01","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":19981,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-03-13 19:05:56","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":30454,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-03-13 19:05:56","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":35817,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-03-13 19:35:40","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":12947,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-03-13 19:35:40","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":16056,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-03-13 19:35:40","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":8195,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-03-13 21:05:34","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2) < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":22394,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-03-13 21:05:34","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2) < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":24464,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:38:14","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":41445,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-14 10:38:38","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":686,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:39:49","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":34865,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-14 10:40:41","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11884,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:42:10","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":41488,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:42:10","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":2072,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-14 10:42:27","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":20265,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-14 10:42:27","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":35950,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 10:50:30","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=0):\n return x2 - x1 + (y2 - y1) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":5169,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 10:51:26","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return x2 - x1 + (y2 - y1) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":34150,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:56:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=0):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 < r1 + r2:\n return 'False'\n else:\n return 'True'","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":16625,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-14 10:56:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance_centre = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n distance_radius = r1 + r2\n return distance_radius > distance_centre","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":23118,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-03-14 10:56:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance_centre = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n distance_radius = r1 + r2\n return distance_radius > distance_centre","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":27550,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:57:01","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=0):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 <= r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":38031,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:57:16","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=0):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 < r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":6669,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:57:35","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=0):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 <= r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":15005,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:58:16","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 <= r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":4953,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:58:28","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 < r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":23407,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:58:53","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 <= r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":24532,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 10:59:10","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2 < r1 + r2:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":7809,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 11:02:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n r = r1 + r2\n if d < r:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":38585,"user":"29883390-7aa0-4484-9f1e-6fd0c1c8c420","date":"2017-03-14 11:02:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n r = r1 + r2\n if d < r:\n return 'True'\n else:\n return 'False'","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":8365,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:10:41","func_code":"def append2list(l1, l2=None):\n l2 = l2 or []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40312,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:10:41","func_code":"def append2list(l1, l2=None):\n l2 = l2 or []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":22367,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:14:24","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n distanceX = x1 - x2\n distanceY = y1 - y2\n radiusSum = circle.Radius + Radius\n return (distanceX * distanceX + distanceY * distanceY <= radiusSum *\n radiusSum)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":33723,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:14:47","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n distanceX = x1 - x2\n distanceY = y1 - y2\n radiusSum = r1 + r2\n return (distanceX * distanceX + distanceY * distanceY <= radiusSum *\n radiusSum)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":9855,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:15:25","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n distanceX = x1 - x2\n distanceY = y1 - y2\n radiusSum = r1 + r2\n print((x1, x2, y1, y2, r1, r2))\n return (distanceX * distanceX + distanceY * distanceY <= radiusSum *\n radiusSum)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":32602,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:21:13","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n return (x1 - x2) ** 2 + (y1 - y2) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":22925,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-03-14 11:21:13","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=1):\n return (x1 - x2) ** 2 + (y1 - y2) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":2405,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:27:17","func_code":"def append2list(l1, l2=[]):\n l = l2\n for i in l1:\n l.append(i)\n return l","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":4596,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:29:17","func_code":"def append2list(l1, l2=[]):\n l = []\n l = l2\n for i in l1:\n l.append(i)\n return l","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":7220,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:32:09","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l.append(i)\n return l","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":23583,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:32:37","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":41126,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:33:30","func_code":"def append2list(l1, l2=[]):\n l = l2\n for i in l1:\n l.append(i)\n return l","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":9669,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:33:48","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":42170,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:33:48","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":27437,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:45:35","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 + y2) ** 2) ** 0.5\n if r1 + r2 >= dis:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":10749,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:47:31","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 + y2) ** 2) ** 0.5\n if r1 + r2 > dis:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":35786,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:54:52","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 + y2) ** 2) ** 0.5\n if r1 + r2 > dis and dis != 0:\n return True\n elif dis == 0 and r1 == r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":25771,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:55:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 + y2) ** 2) ** 0.5\n if r1 + r2 >= dis and dis != 0:\n return True\n elif dis == 0 and r1 == r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":27900,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:56:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 + y2) ** 2) ** 0.5\n if r1 + r2 > dis and dis != 0:\n return True\n elif dis == 0 and r1 == r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":2450,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:58:50","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n if r1 + r2 > dis and dis != 0:\n return True\n elif dis == 0 and r1 == r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":22787,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:59:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n if r1 + r2 > dis and dis != 0:\n return True\n elif dis == 0 and r1 == r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":31817,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 11:59:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n if r1 + r2 >= dis and dis != 0:\n return True\n elif dis == 0 and r1 == r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":75,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 12:01:16","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n if r1 + r2 > dis:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":8563,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-03-14 12:01:16","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n if r1 + r2 > dis:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":18226,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2017-03-14 12:46:23","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":21012,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2017-03-14 12:53:41","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31728,"user":"2c7a8a81-53ed-42cc-bd4e-e268d1d767be","date":"2017-03-14 12:53:41","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":7982,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:18:45","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":27448,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:18:45","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":21967,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-14 13:24:15","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40894,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-14 13:24:15","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":38719,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:26:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return x2 - x1 + (y2 - y1) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":40172,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-14 13:29:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)\n if a >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":19354,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-03-14 13:29:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)\n if a >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":4794,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:30:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n print((type(x1), type(y1), type(r1), type(x2), type(y2), type(r2)))","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":27323,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:32:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n print((x1, y1, r1, x2, y2, r2))","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":11102,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:34:01","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 < (x0 - x1) ** 2 + (y0 - y1) ** 2 < (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":17651,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-14 13:34:16","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":3519,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:34:16","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return x1, y1, r1, x2, y2, r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":31053,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:34:20","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 < (x0 - x1) ** 2 + (y0 - y1) ** 2 < (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":8617,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:34:32","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 <= (x0 - x1) ** 2 + (y0 - y1) ** 2 <= (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":24147,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:35:02","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 <= (x0 - x1) ** 2 + (y0 - y1) ** 2 < (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":12713,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:35:17","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 <= (x0 - x1) ** 2 + (y0 - y1) ** 2 < (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":33933,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:35:27","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return x2 - x1 + (y2 - y1) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":40992,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-14 13:35:59","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":6584,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-14 13:36:36","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":21020,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-14 13:36:36","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":9966,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:37:10","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return x2 - x1 + (y2 - y1) ** 0.5 < float(r1 + r2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":26358,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:37:57","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (x2 - x1 + (y2 - y1)) ** 0.5 < float(r1 + r2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":5312,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 13:38:19","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23974,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:39:38","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return float((x2 - x1 + (y2 - y1)) ** 0.5) < float(r1 + r2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":25933,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:40:37","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return int((x2 - x1 + (y2 - y1)) ** 0.5) < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":6794,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:41:12","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (x2 - x1 + (y2 - y1)) ** 0.5","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":32576,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:42:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (x2 - x1 + (y2 - y1)) ** 0.5 \/\/ 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":37675,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:43:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (x2 - x1 + (y2 - y1)) ** 0.5 \/ 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":31931,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 13:43:34","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":29931,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:44:30","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (x2 - x1 + (y2 - y1)) ** 0.5 \/ 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":35387,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:47:38","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (x2 - x1 + (y2 - y1)) ** 0.5 \/ 2\n radii = r1 + r2\n print((distance, radii))","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":13447,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:49:14","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n print((distance, radii))","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":19410,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:49:17","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 <= (x0 - x1) ** 2 + (y0 - y1) ** 2 <= (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":5963,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:49:33","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if (R0 - R1) ** 2 <= (x0 - x1) ** 2 + (y0 - y1) ** 2 < (R0 + R1) ** 2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":32983,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:50:02","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if R0 - R1 <= x0 - x1 + (y0 - y1) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":35233,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:50:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance > radii","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":26855,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:50:22","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance < radii","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":927,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 13:50:22","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance < radii","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":24111,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 13:52:08","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":30498,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 13:52:41","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":8348,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:52:42","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if R0 - R1 <= x0 - x1 + (y0 - y1) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":30759,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:53:08","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if R0 - R1 <= x0 - x1 + (y0 - y1) or x0 + x1 + (y0 + y1) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":15200,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:53:36","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if R0 - R1 <= x0 - x1 + (y0 - y1) or x0 - x1 + (y0 - y1) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":20554,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 13:53:43","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":10518,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:53:52","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if R0 - R1 <= x0 - x1 + (y0 - y1) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":11770,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 13:54:36","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23173,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:54:44","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":3314,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:55:03","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":17004,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:56:00","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) <= R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":4732,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:56:09","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":6704,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 13:57:12","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":9278,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 13:57:49","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rad = (r1 + r2) ** 2\n xs = (x1 - x2) ** 2\n ys = (y1 - y2) ** 2\n both_x_y = xs + ys\n if rad > both_x_y:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":11337,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 13:57:49","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rad = (r1 + r2) ** 2\n xs = (x1 - x2) ** 2\n ys = (y1 - y2) ** 2\n both_x_y = xs + ys\n if rad > both_x_y:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":2685,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-14 13:58:58","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":6797,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:00:53","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":2974,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:11:28","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n A = False\n try:\n overlap = A\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap\n except KeyError:\n print(A)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":35902,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:12:09","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n try:\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap\n except KeyError:\n print(True)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":33800,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:12:36","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n A = False\n try:\n overlap = A\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap\n except TypeError:\n print(A)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":25340,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:13:02","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n try:\n overlap = False\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap\n except TypeError:\n print(True)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":16296,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:14:12","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n A = False\n try:\n overlap = A\n if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:\n overlap = True\n return overlap\n except TypeError:\n print(A)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":10867,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-14 14:17:01","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":32181,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:17:50","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n A = False\n try:\n overlap = A\n if math.sqrt((int(x0) - int(x1)) ** 2 + (int(y0) - int(y1)) ** 2\n ) < int(R0) + int(R1):\n overlap = True\n return overlap\n except TypeError:\n print(A)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":40517,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-14 14:19:17","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n return r1 + r2 < distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":10369,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 14:19:21","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":32683,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:20:12","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n A = False\n try:\n overlap = True\n if math.sqrt((int(x0) - int(x1)) ** 2 + (int(y0) - int(y1)) ** 2\n ) < int(R0) + int(R1):\n overlap = A\n return overlap\n except TypeError:\n print(A)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":29613,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-14 14:21:13","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n return r1 + r2 > distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":36741,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-14 14:21:13","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n return r1 + r2 > distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":24964,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:22:02","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n A = False\n try:\n overlap = A\n if math.sqrt((int(x1) - int(x0)) ** 2 + (int(y1) - int(y0)) ** 2\n ) < int(R0) + int(R1):\n overlap = True\n return overlap\n except TypeError:\n print(A)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":31077,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:23:04","func_code":"def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):\n try:\n overlap = False\n if math.sqrt((int(x1) - int(x0)) ** 2 + (int(y1) - int(y0)) ** 2\n ) < int(R0) + int(R1):\n overlap = True\n return overlap\n except TypeError:\n pass","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":4300,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 14:23:52","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":21678,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 14:23:52","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":5154,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-14 14:23:52","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":33584,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:38:27","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n try:\n overlap = False\n if math.sqrt((x1 - x0) ** 2 + (y1 - y0) ** 2) < R0 + R1:\n overlap = True\n return overlap\n except TypeError:\n pass","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":30421,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:39:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n try:\n overlap = False\n if math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2:\n overlap = True\n return overlap\n except TypeError:\n pass","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":36484,"user":"6ae36e81-5a79-4a87-a484-a86635591a14","date":"2017-03-14 14:39:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n try:\n overlap = False\n if math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2:\n overlap = True\n return overlap\n except TypeError:\n pass","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":2328,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-14 14:39:38","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n overlap = False\n if math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) < r1 + r2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":21653,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-14 15:00:43","func_code":"def append2list(l1, l2=[]):\n empty = []\n for i in l2:\n empty.append(i)\n for i in l1:\n empty.append(i)\n return empty","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18219,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-14 15:00:43","func_code":"def append2list(l1, l2=[]):\n empty = []\n for i in l2:\n empty.append(i)\n for i in l1:\n empty.append(i)\n return empty","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":32717,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-14 15:01:05","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n overlap = False\n if math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) < r1 + r2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":19627,"user":"0f49aa06-8917-4312-903b-8a4431682b21","date":"2017-03-14 15:01:05","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n overlap = False\n if math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) < r1 + r2:\n overlap = True\n return overlap","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":19142,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-14 15:04:11","func_code":"def append2list(l1, l2=[][:]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":4028,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-14 15:05:06","func_code":"def append2list(l1, l2=[][:]):\n return l1 + l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":30114,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-14 15:05:27","func_code":"def append2list(l1, l2=[][:]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":14635,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-14 15:05:27","func_code":"def append2list(l1, l2=[][:]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":42409,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-14 15:05:27","func_code":"def append2list(l1, l2=[][:]):\n return l2 + l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":36474,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-14 15:13:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n circles = r1 + r2\n if distance < circles:\n print(True)\n else:\n print(False)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":35704,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-14 15:13:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n circles = r1 + r2\n if distance < circles:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":37044,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-03-14 15:13:43","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 \/ 2)\n circles = r1 + r2\n if distance < circles:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":23042,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-14 15:17:25","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (x1 - x2) ** 2 + (y1 - y2) ** 2\n if (r1 + r2) ** 2 > distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":39021,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-03-14 15:17:25","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (x1 - x2) ** 2 + (y1 - y2) ** 2\n if (r1 + r2) ** 2 > distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":10110,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-14 15:46:03","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2 - 1\n rneg = r1 - r2\n if d == rpos:\n return True\n elif d == rneg:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":26113,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-14 15:47:39","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2\n return d < rpos","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":36408,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-14 15:47:39","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2\n return d < rpos","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":19773,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 15:55:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance < radii","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":18275,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 15:55:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance < radii","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":31974,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 15:58:25","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":9663,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 16:03:43","func_code":"def append2list(l1, l2=None):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":16410,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 16:03:43","func_code":"def append2list(l1, l2=None):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":33366,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-03-14 16:03:43","func_code":"def append2list(l1, l2=None):\n if not l2:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":4228,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 16:23:21","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":5352,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 16:23:21","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31867,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-03-14 16:23:21","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18247,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-14 19:20:28","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":39751,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-14 19:20:28","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25664,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-14 20:44:47","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":6038,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-14 20:44:47","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31876,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-14 20:58:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if dis < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":9549,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-03-14 20:58:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if dis < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":36445,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-14 21:03:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if float(r1) > distance - r2 and float(r2) > distance - r1:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":14924,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-14 21:03:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if float(r1) > distance - r2 and float(r2) > distance - r1:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":28580,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-14 21:03:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if float(r1) > distance - r2 and float(r2) > distance - r1:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":3267,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-14 21:06:19","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":3682,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-14 21:06:19","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":24069,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 21:11:45","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26705,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 21:11:45","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":980,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 21:11:45","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":true} +{"submission_id":13579,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 21:11:45","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 10\n else:\n return 7","func_name":"get_price","assignment_id":"funcs.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19713,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 21:13:05","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 10\n else:\n return 7","func_name":"get_price","assignment_id":"funcs.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30921,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 21:13:05","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11312,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 21:13:05","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 1\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 1\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":false} +{"submission_id":23781,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 21:13:05","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":15415,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-14 21:16:24","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":40135,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-03-14 21:16:24","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":5763,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 7\n else:\n return 10","func_name":"get_price","assignment_id":"funcs.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23219,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":true} +{"submission_id":3396,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":true} +{"submission_id":20662,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 7\n else:\n return 10","func_name":"get_price","assignment_id":"funcs.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":4569,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":true} +{"submission_id":17941,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31431,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":4025,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":5400,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21273,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 7\n else:\n return 10","func_name":"get_price","assignment_id":"funcs.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17565,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":42389,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-14 22:13:20","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":14644,"user":"cc092be9-9a93-44dc-8aef-c2a75acd4b48","date":"2017-03-15 10:45:37","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":30772,"user":"cc092be9-9a93-44dc-8aef-c2a75acd4b48","date":"2017-03-15 10:46:06","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":24531,"user":"cc092be9-9a93-44dc-8aef-c2a75acd4b48","date":"2017-03-15 10:46:06","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":8566,"user":"cc092be9-9a93-44dc-8aef-c2a75acd4b48","date":"2017-03-15 10:46:06","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31644,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-15 11:59:55","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":5654,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-15 12:01:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":24599,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-03-15 12:01:29","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":16729,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-15 12:20:11","func_code":"def append2list(l1, l2=[]):\n if l2 != None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":15670,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-15 12:24:16","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11176,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:26:51","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":4577,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-15 12:28:19","func_code":"def append2list(l1, l2=[]):\n if l2 != None:\n if len(l2) > 1:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":33836,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-15 12:29:41","func_code":"def append2list(l1, l2=[]):\n if len(l2) > 1:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":18931,"user":"f69c7616-4d20-4dbe-b3f8-0d10db7adfe4","date":"2017-03-15 12:29:41","func_code":"def append2list(l1, l2=[]):\n if len(l2) > 1:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":13297,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:29:50","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13939,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:32:21","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":4223,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:33:56","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":33171,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:35:26","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":24255,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:36:59","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31673,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:38:24","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":12608,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:42:06","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":28605,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:44:29","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":36193,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:44:29","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":9733,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-03-15 12:44:29","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25692,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:09:32","func_code":"def append2list(l1, l2=None):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":36450,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:09:55","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":37298,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:16:19","func_code":"def append2list(l1, l2=None):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":22873,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:17:49","func_code":"def append2list(l1, l2):\n for i in l1:\n l2.append(i)\n return l2\n if l2 is None:\n l2 = []","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":30768,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:21:04","func_code":"def append2list(l1, l2):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":17743,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:21:38","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23175,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:22:08","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31741,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:22:31","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":10844,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:24:04","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":1713,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:30:59","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":33082,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-03-15 13:30:59","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":5019,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-15 14:04:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n sumofradi = r1 + r2\n return distance < sumofradi","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":18469,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-15 14:04:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n sumofradi = r1 + r2\n return distance < sumofradi","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":31208,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-03-15 14:04:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n sumofradi = r1 + r2\n return distance < sumofradi","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":22226,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-15 14:41:18","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2\n return d < rpos","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":13036,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-03-15 14:41:18","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n rpos = r1 + r2\n return d < rpos","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":9911,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 19:55:28","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25245,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 19:58:45","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n else:\n l2 = l2\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":17089,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 19:58:45","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n else:\n l2 = l2\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11088,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 20:12:59","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1 ** 2)) ** 1 \/ 2 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":4007,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 20:31:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 1 \/ 2\n total_radius = r1 + r2\n if distance < total_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":25956,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 20:40:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n total_radius = r1 + r2\n print((x1, y1, r1, x2, y2, r2))\n print((total_radius, distance))\n if distance < total_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":25484,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 20:40:15","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n total_radius = r1 + r2\n if distance < total_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":22444,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-03-15 20:40:15","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n total_radius = r1 + r2\n if distance < total_radius:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":41431,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-15 21:24:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (abs((x2 - x1) ** 2) + abs((y2 - y1) ** 2)) ** 0.5\n if r1 + r2 > distance and abs(r1 - r2) <= distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":6348,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-15 21:27:28","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (abs((x2 - x1) ** 2) + abs((y2 - y1) ** 2)) ** 0.5\n if r1 + r2 > distance and abs(r1 - r2) <= distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":20872,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-15 21:28:34","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (abs((x2 - x1) ** 2) + abs((y2 - y1) ** 2)) ** 0.5\n if r1 + r2 > distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":7286,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-03-15 21:28:34","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = (abs((x2 - x1) ** 2) + abs((y2 - y1) ** 2)) ** 0.5\n if r1 + r2 > distance:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":40787,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-15 21:49:02","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":10484,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-15 21:49:02","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":30730,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-15 21:49:02","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":27024,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-15 23:22:16","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":42149,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-15 23:22:16","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":27485,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-03-15 23:22:16","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":28048,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-16 01:09:55","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n if x1 == x2 and y1 == y2 and r1 == r2:\n return True\n distance = (x2 - x1 + (y2 - y1)) ** 0.5\n if abs(distance) < r1 or abs(distance) < r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":27549,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-16 01:27:46","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n A = True\n if x1 == x2 and y1 == y2 and r1 == r2:\n return A\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if abs(distance) <= r1:\n return A\n if abs(distance) <= r2:\n return A\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":15954,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-16 01:27:46","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n A = True\n if x1 == x2 and y1 == y2 and r1 == r2:\n return A\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if abs(distance) <= r1:\n return A\n if abs(distance) <= r2:\n return A\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":27268,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-03-16 01:27:46","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n A = True\n if x1 == x2 and y1 == y2 and r1 == r2:\n return A\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if abs(distance) <= r1:\n return A\n if abs(distance) <= r2:\n return A\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":24628,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-16 10:05:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n item1 = (x2 - x1) ** 2\n item2 = (y2 - y1) ** 2\n item3 = item1 + item2\n distance = item3 ** (1 \/ 2)\n radiusd = r1 + r2\n if distance < radiusd:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":12101,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-16 10:05:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n item1 = (x2 - x1) ** 2\n item2 = (y2 - y1) ** 2\n item3 = item1 + item2\n distance = item3 ** (1 \/ 2)\n radiusd = r1 + r2\n if distance < radiusd:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":27039,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-03-16 10:05:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n item1 = (x2 - x1) ** 2\n item2 = (y2 - y1) ** 2\n item3 = item1 + item2\n distance = item3 ** (1 \/ 2)\n radiusd = r1 + r2\n if distance < radiusd:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":38336,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-16 10:52:09","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23233,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-16 10:52:09","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":22246,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-16 11:03:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (r1 + r2) ** 2 >= (x1 - x2) ** 2 + (y1 - y2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":12655,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-16 11:36:21","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (r1 + r2) ** 2 >= (x1 - x2) ** 2 + (y1 - y2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":10787,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-16 11:37:59","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (r1 + r2) ** 2 > (x1 - x2) ** 2 + (y1 - y2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":15693,"user":"420bf3b7-f5e7-4d7a-9cbb-fd46a8b4e956","date":"2017-03-16 11:37:59","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (r1 + r2) ** 2 > (x1 - x2) ** 2 + (y1 - y2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":39931,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-16 12:59:47","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31037,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-03-16 12:59:47","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":17508,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:21:11","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18546,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:21:11","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":32141,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:27:58","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n hypotenuse = ((x2 - x1) ** 2 + (y2 - x1) ** 2) ** 0.5\n if hypotenuse > r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":30699,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:29:25","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n hypotenuse = ((x2 - x1) ** 2 + (y2 - x1) ** 2) ** 0.5\n if hypotenuse >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":22768,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:29:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n hypotenuse = ((x2 - x1) ** 2 + (y2 - x1) ** 2) ** 0.5\n if hypotenuse > r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":9216,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:34:44","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n hypotenuse = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if hypotenuse > r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":5350,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:36:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n hypotenuse = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if hypotenuse >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":36354,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-03-16 14:36:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n hypotenuse = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if hypotenuse >= r1 + r2:\n return False\n else:\n return True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":8075,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:41:12","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31102,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:43:57","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":42187,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:45:10","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":16697,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:48:31","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40650,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:48:43","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":32224,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:49:05","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":28439,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:49:22","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25803,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:50:30","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13635,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:51:07","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":31106,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:51:26","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":25754,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:52:55","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":4828,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:53:20","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":9896,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:56:04","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":17452,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:56:23","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":16324,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 14:58:20","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":5322,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:00:58","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":27476,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-16 15:03:38","func_code":"def distance(x1, y1, x2, y2):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return distance(x1, y1, x2, y2) < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":16263,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-16 15:03:38","func_code":"def distance(x1, y1, x2, y2):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return distance(x1, y1, x2, y2) < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":36057,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-03-16 15:03:38","func_code":"def distance(x1, y1, x2, y2):\n return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return distance(x1, y1, x2, y2) < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":13241,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:03:47","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":37988,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:04:08","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":6284,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:04:20","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":408,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:05:01","func_code":"def append2list(l1, l2):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":2016,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:05:36","func_code":"def append2list(l1):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":9806,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:05:57","func_code":"def append2list(l1):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":16795,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:06:26","func_code":"def append2list(l1):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":27425,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:08:13","func_code":"def append2list(l1, l2):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":25260,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:08:24","func_code":"def append2list(l1, l2=[]):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":25257,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:08:49","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40136,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:09:16","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18232,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:10:35","func_code":"def append2list(l1, l2='none'):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":516,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-16 15:11:06","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n sumradi = r1 + r2\n return distance < sumradi","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":11230,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-16 15:11:06","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n sumradi = r1 + r2\n return distance < sumradi","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":3677,"user":"5a6b9af4-c978-4326-ba5b-405c4a284f15","date":"2017-03-16 15:11:06","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n sumradi = r1 + r2\n return distance < sumradi","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":22947,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:12:03","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n return l1\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":14358,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:12:03","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n return l1\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13966,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:31:57","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n if r1 + r2 >= ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":12094,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:32:27","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n if r1 + r2 >= ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":11249,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:35:42","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n x1 = 0\n y1 = 0\n r1 = 1\n x2 = 0\n y2 = 0\n r2 = 1\n if r1 + r2 >= ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":39795,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:38:38","func_code":"def overlap(x1, y1, r1, x2, y2, r2):\n x1 = 0\n y1 = 0\n r1 = 1\n x2 = 0\n y2 = 0\n r2 = 1\n if r1 + r2 >= ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":10696,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:45:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if r1 + r2 > ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":29112,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:45:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if r1 + r2 > ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":28316,"user":"5065a0ff-7a47-48ce-b85e-50368a79de61","date":"2017-03-16 15:45:09","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if r1 + r2 > ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":32734,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-16 16:22:49","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n if dist - r1 - r2 < 0:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":4351,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-16 16:24:11","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n if dist - r1 - r2 < 0:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":21168,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-03-16 16:24:11","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n if dist - r1 - r2 < 0:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":40716,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-16 16:30:31","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":8633,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-16 16:30:31","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":38049,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-16 16:32:20","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r2 + r1","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":15750,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-03-16 16:32:20","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r2 + r1","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":31849,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-16 17:50:55","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":38110,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-16 17:50:55","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":42242,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-16 18:46:47","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":20462,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-16 18:46:47","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":12350,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-03-16 18:46:47","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":30998,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-16 23:06:20","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = 0.5 ** ((x1 - x2) ** 2 + (y1 - y2) ** 2)\n return distance < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":35117,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-16 23:10:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":26888,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-16 23:10:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":38697,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-03-16 23:10:04","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":19155,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-17 11:24:49","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":42091,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-17 11:24:49","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25774,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-17 11:25:53","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":18077,"user":"3a86cbea-7925-4e8e-9baa-3505dd2219c7","date":"2017-03-17 11:25:53","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":3581,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 11:38:46","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return abs(r1 - r2) <= math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) <= abs(\n r1 + r2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":40347,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 11:41:39","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return r2 >= math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) + r1","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":42473,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 11:48:00","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n return abs(r1 - r2) <= dist <= abs(r1 + r2) and (r1 > dist + r2 or r2 >\n dist + r1)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":20442,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 11:49:18","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n inside = r1 > dist + r2 or r2 > dist + r1\n return abs(r1 - r2) <= dist <= abs(r1 + r2) and inside != True","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":32400,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 11:50:01","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n return abs(r1 - r2) <= dist <= abs(r1 + r2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":34413,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 11:58:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n return abs(r1 - r2) < dist < abs(r1 + r2)","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":2408,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 12:00:56","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n return abs(r1 - r2) < dist < abs(r1 + r2\n ) or x1 == x2 and y1 == y2 and r1 == r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":4874,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 12:03:21","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n internal = r1 + r2\n external = abs(r1 - r2)\n return internal == dist or external == dist","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":19795,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 12:11:38","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":26810,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 12:14:03","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n return l1\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40133,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 12:14:03","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n return l1\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":39918,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-17 13:26:32","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":37296,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-17 13:26:32","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":23871,"user":"3a14771a-b55c-44f8-97ab-0376389e494c","date":"2017-03-17 14:53:57","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = abs(x2 - x1)\n o = abs(y2 - y1)\n h2 = a ** 2 + o ** 2\n h = h2 ** 0.5\n return h <= r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":29556,"user":"3a14771a-b55c-44f8-97ab-0376389e494c","date":"2017-03-17 14:55:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = abs(x2 - x1)\n o = abs(y2 - y1)\n h2 = a ** 2 + o ** 2\n h = h2 ** 0.5\n return h < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":37180,"user":"3a14771a-b55c-44f8-97ab-0376389e494c","date":"2017-03-17 14:55:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = abs(x2 - x1)\n o = abs(y2 - y1)\n h2 = a ** 2 + o ** 2\n h = h2 ** 0.5\n return h < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":37869,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-17 15:51:01","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":11658,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-17 15:51:01","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":28647,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-17 15:52:02","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":14796,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-03-17 15:52:02","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31549,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 16:46:38","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n internal = r1 + r2\n external = abs(r1 - r2)\n return internal == dist or external == dist","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":13455,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 16:47:52","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n internal = r1 + r2\n external = r1 - r2\n return internal == dist or external == dist","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":39230,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 16:51:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n radii = r1 + r2\n return radii > dist","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":26779,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-03-17 16:51:36","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)\n radii = r1 + r2\n return radii > dist","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":29282,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-17 17:52:30","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":16018,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-03-17 17:52:30","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":13697,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 22:26:04","func_code":"def distance(x1, y1, x2, y2):\n disx = (x2 - x1) ** 2\n disy = (y2 - y1) ** 2\n dist = disx + disy\n return math.sqrt(dist)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if distance(x1, y1, x2, y2) < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":10941,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 22:26:04","func_code":"def distance(x1, y1, x2, y2):\n disx = (x2 - x1) ** 2\n disy = (y2 - y1) ** 2\n dist = disx + disy\n return math.sqrt(dist)\n\n\ndef overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if distance(x1, y1, x2, y2) < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":7108,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-17 22:35:14","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":9147,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-17 22:35:14","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":14878,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-17 22:45:24","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":27465,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-17 22:45:24","func_code":"def append2list(l1, l2=None):\n if l2 is None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":30191,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-17 22:46:24","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":8052,"user":"dc42d7ae-53d0-4b49-988b-c619edf38a77","date":"2017-03-17 22:46:24","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2\n return distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":5279,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-17 22:46:36","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n A = True\n if x1 == x2 and y1 == y2 and r1 == r2:\n return A\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if abs(distance) <= r1:\n return A\n if abs(distance) <= r2:\n return A\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":19391,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-03-17 22:46:36","func_code":"def overlap(x1=0, y1=0, r1=0, x2=0, y2=0, r2=0):\n A = True\n if x1 == x2 and y1 == y2 and r1 == r2:\n return A\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n if abs(distance) <= r1:\n return A\n if abs(distance) <= r2:\n return A\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":4092,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-17 23:07:40","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18949,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-17 23:07:40","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":9942,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-17 23:07:40","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n if ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":19846,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-03-17 23:07:40","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":7106,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 23:12:17","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":21751,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 23:12:43","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":740,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 23:21:35","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n if len(l2) < 2:\n return l2\n else:\n l2.remove(l2[0])\n l2.remove(l2[0])\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":33227,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 23:21:35","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n if len(l2) < 2:\n return l2\n else:\n l2.remove(l2[0])\n l2.remove(l2[0])\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":15203,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-03-17 23:21:35","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n if len(l2) < 2:\n return l2\n else:\n l2.remove(l2[0])\n l2.remove(l2[0])\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":16355,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-17 23:35:02","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":29814,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-17 23:35:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance < radii","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":30007,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-17 23:35:02","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31126,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-17 23:35:02","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5\n radii = r1 + r2\n return distance < radii","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":10587,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-03-17 23:35:02","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":7483,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-17 23:46:27","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":35565,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-17 23:48:04","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13508,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-17 23:48:04","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":20816,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-17 23:49:20","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rad = (r1 + r2) ** 2\n xs = (x1 - x2) ** 2\n ys = (y1 - y2) ** 2\n both_x_y = xs + ys\n if rad > both_x_y:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":6548,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-03-17 23:49:20","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n rad = (r1 + r2) ** 2\n xs = (x1 - x2) ** 2\n ys = (y1 - y2) ** 2\n both_x_y = xs + ys\n if rad > both_x_y:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":29865,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:15:26","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs08.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30845,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:15:26","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 10\n else:\n return 7","func_name":"get_price","assignment_id":"funcs08.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5172,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:15:26","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":true} +{"submission_id":9263,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:15:26","func_code":"def search(str, sub):\n i = 0\n while i < len(str):\n if sub == str[i]:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":1697,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:15:26","func_code":"def countdown(num):\n while num >= 0:\n print(num)\n num = num - 1","func_name":"countdown","assignment_id":"funcs08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19621,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:15:26","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":25402,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:15:26","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12563,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs08.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":4832,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def countdown(num):\n while num >= 0:\n print(num)\n num = num - 1","func_name":"countdown","assignment_id":"funcs08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":9477,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def search(str, sub):\n i = 0\n while i < len(str):\n if sub == str[i]:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":3813,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15050,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def search(str, sub):\n i = 0\n while i < len(str):\n if sub == str[i]:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":22441,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":450,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def countdown(num):\n while num >= 0:\n print(num)\n num = num - 1","func_name":"countdown","assignment_id":"funcs08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19517,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def countdown(num):\n while num >= 0:\n print(num)\n num = num - 1","func_name":"countdown","assignment_id":"funcs08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":40370,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":27780,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def search(str, sub):\n i = 0\n while i < len(str):\n if sub == str[i]:\n return i\n i = i + 1\n return -1","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":30823,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":true} +{"submission_id":30331,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 10\n else:\n return 7","func_name":"get_price","assignment_id":"funcs08.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26095,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":true} +{"submission_id":9215,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs08.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28848,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 10\n else:\n return 7","func_name":"get_price","assignment_id":"funcs08.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29879,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":16258,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def weird_case(some_str):\n new_str = ''\n i = 0\n lc = 0\n while i < len(some_str):\n if some_str[i].isalpha():\n if lc % 2 == 0:\n new_str += some_str[i].upper()\n else:\n new_str += some_str[i].lower()\n lc += 1\n else:\n new_str += some_str[i]\n i = i + 1\n return new_str","func_name":"weird_case","assignment_id":"funcs08.py_ca278_weird_case","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3735,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":7928,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def merge_lists(l1, l2):\n l3 = []\n i = 0\n while i < len(l1):\n l3.append(l1[i])\n i += 2\n i = 0\n while i < len(l2):\n l3.append(l2[i])\n i += 2\n return l3","func_name":"merge_lists","assignment_id":"merge_lists","academic_year":2016,"module":"ca278","description":"Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.","test":"assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]","correct":true} +{"submission_id":1498,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def remove_zeros(list):\n while 0 in list:\n list.remove(0)","func_name":"remove_zeros","assignment_id":"remove_zeros","academic_year":2016,"module":"ca278","description":"Take a list of numbers and removes the zeros from it.","test":"assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None","correct":true} +{"submission_id":8366,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-20 22:16:19","func_code":"def get_price(age):\n if age <= 16:\n return 5\n elif age <= 60:\n return 10\n else:\n return 7","func_name":"get_price","assignment_id":"funcs08.py_ca278_get_price","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37457,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:01:16","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":37876,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:01:16","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":15982,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:01:16","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37000,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:01:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":34334,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:06:00","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":14377,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:06:00","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":3806,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:06:00","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15685,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:06:00","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16156,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:08:04","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":6856,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:08:04","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15769,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:08:04","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":25995,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:08:04","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":28999,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:24:37","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":13229,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:24:37","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":29162,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:24:37","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":24673,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:24:37","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":246,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:25:21","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":7972,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:25:21","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":21922,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:25:21","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":42292,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:25:21","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n fibN_2 = 1\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39668,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":10080,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":34755,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n if n == 1:\n return 1\n else:\n fibN_2 = 0\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":30075,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n if n == 1:\n return 1\n else:\n fibN_2 = 0\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":18093,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12762,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":21333,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":13111,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:35:58","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":35583,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":41631,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":24877,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":7076,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17387,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":39739,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":16611,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5800,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17159,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":14010,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":5613,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":22291,"user":"94e64aae-7bb0-45bd-8969-e98b17d0a3da","date":"2017-03-21 22:38:14","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":5814,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 12:19:19","func_code":"def countdown(num):\n i = int(input())\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37372,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:29:37","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":16610,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:29:37","func_code":"def countdown(num):\n for n in range(num):\n print(n)\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23593,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:29:37","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = [0]\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":34475,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:29:37","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":35706,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:01","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":36031,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:01","func_code":"def countdown(num):\n for n in range(num):\n print(n)\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21222,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:01","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":1571,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:01","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = [0]\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":9814,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:41","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = [0]\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23046,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:41","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":8487,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:41","func_code":"def countdown(num):\n for n in range(num, -1):\n print(n)\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":9226,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:30:41","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":40156,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:33:26","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":2042,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:33:26","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = []\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":235,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:33:26","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":28709,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:33:26","func_code":"def countdown(num):\n for n in range(num, -1):\n print(n)\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6045,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:34:58","func_code":"def countdown(num):\n for n in range(num, 0):\n print(n)\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11558,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:34:58","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":28484,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:34:58","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":34227,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:34:58","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = []\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":9382,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":41441,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def countdown(num):\n for n in range(num, 0, -1):\n print(n)\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":39555,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":12766,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":31136,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = []\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":8670,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":11716,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = []\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":37523,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def countdown(num):\n for n in range(num, 0, -1):\n print(n)\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33897,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def fibonacci(n):\n inc1 = 1\n inc2 = 0\n inc3 = ''\n l1 = []\n for fib in range(0, n + 1):\n inc3 = inc2\n inc2 = inc1\n inc1 = inc3 + inc2\n l1.append(inc3)\n return l1[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":32092,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":17304,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":414,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-22 12:35:18","func_code":"def countdown(num):\n for n in range(num, 0, -1):\n print(n)\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":39697,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 12:55:56","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30402,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:00:38","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":39429,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:00:38","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":38356,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:01:24","func_code":"def countdown(num):\n i = 0\n while i < num:\n print(i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22953,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:01:56","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":29901,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:01:57","func_code":"def countdown(num):\n i = num\n while i > 0:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10088,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:02:24","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":38802,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:02:24","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":16137,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:02:24","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33444,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:03:34","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":28533,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:03:34","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n else:\n print(num)\n time.sleep(0.1)\n print('LIFT OFF!')\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33454,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:04:42","func_code":"def search(string, letter):\n i = 0\n if letter in string:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":10430,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:04:42","func_code":"def countdown(num):\n i = num\n while i > 0:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":27737,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:05:25","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":8534,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:05:25","func_code":"def countdown(num):\n A = 'LIFT OFF!'\n if int(num) == 1:\n print(num)\n print(A)\n else:\n print(num)\n time.sleep(0.1)\n print(A)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15949,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:06:01","func_code":"def countdown(num):\n A = 'LIFT OFF!'\n if int(num) == 1:\n print(num)\n print(A)\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)\n print(A)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21826,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:06:01","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16664,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:06:27","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)\n return str, letter","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":35203,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:06:27","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')\n return str, letter","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":30014,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:06:27","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":27884,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:07:17","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":1557,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:07:17","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')\n return","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":31036,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:07:17","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)\n return","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":5975,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:07:31","func_code":"def countdown(num):\n A = 'LIFT OFF!'\n if int(num) == 1:\n print(num)\n print(A)\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)\n print(A)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17094,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:07:31","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":15943,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:08:00","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":25451,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:08:00","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":12566,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:08:00","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33343,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:08:02","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":41160,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:08:02","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":24650,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:08:30","func_code":"def search(string, letter):\n if letter in string:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23268,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:08:30","func_code":"def countdown(num):\n i = num\n while i > 0:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31310,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:08:30","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":39010,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:09:03","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":39209,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:09:03","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":25368,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:09:56","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20818,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:09:56","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":13329,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:09:56","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":39141,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:10:39","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":804,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:10:39","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":2259,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:10:39","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":32052,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:11:30","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11539,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:11:30","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n print(i)\n else:\n print('-1')","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":16385,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:11:30","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":18670,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:11:58","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":7136,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:11:58","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":1980,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:11:58","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":16844,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:11:58","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":2327,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:12:48","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return true\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":7102,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:12:48","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":39407,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:12:48","func_code":"def countdown(num):\n i = num\n while i > 0:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22282,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:13:03","func_code":"def countdown(num):\n i = num\n while i > 0:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36204,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:13:03","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":23097,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:13:03","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":36625,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:13:07","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":39083,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:13:22","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return False\n else:\n return True","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":6387,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:14:14","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return False\n return True","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":39335,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:14:37","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":15162,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:15:42","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16510,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:16:19","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":41618,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:16:19","func_code":"def search(str, letter):\n if letter in str:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":24718,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:16:19","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n letter = letter[0]","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":16741,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:16:44","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30079,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:16:44","func_code":"def search(string, letter):\n if letter in string:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":685,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:17:28","func_code":"def index(str, letter):\n for item in str:\n if item == letter:\n return item\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":11717,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:17:28","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35693,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:17:28","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":5685,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:17:29","func_code":"def search(str, letter):\n if letter in str:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":9354,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:17:29","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31190,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:17:29","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)\n\n\ndef search(str, letter):\n if letter in str:\n print('True')\n else:\n print('False')\n\n\ndef index(str, letter):\n i = 0\n if letter in str:\n letter = letter[0]","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":30458,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:17:30","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":27712,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:17:30","func_code":"def search(string, letter):\n if letter in string:\n print('True')\n else:\n print('False')\n return string","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":39976,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:19:27","func_code":"def search(string, letter):\n if letter in string:\n print('True')\n else:\n print('False')\n return 1","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":39980,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:19:27","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20636,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-22 13:19:36","func_code":"def countdown(num):\n i = 0\n while i < num:\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30414,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-22 13:19:36","func_code":"def countdown(num):\n i = 0\n while i < num:\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38807,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-22 13:19:36","func_code":"def countdown(num):\n i = 0\n while i < num:\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12090,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:21:49","func_code":"def search(string, letter):\n if letter in string:\n print('True')\n else:\n print('False')\n return letter","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":40702,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:21:49","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":146,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:22:12","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29855,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:23:54","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":33371,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:23:54","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":39685,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:23:54","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return False","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":28700,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:23:59","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":18535,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:24:09","func_code":"def search(string, letter):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":27949,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:24:09","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29489,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:24:20","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":6184,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:24:20","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":27099,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:24:20","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":11572,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:27:35","func_code":"def search(str, letter):\n list(map(split, str))\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":32136,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:27:35","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":24356,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:28:37","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":32769,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:28:37","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35081,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:30:04","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":18149,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":33544,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":24977,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":14194,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29804,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31783,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":9315,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":20212,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":1971,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":32214,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":4077,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":38091,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-22 13:30:42","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":2999,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:30:46","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35813,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:30:47","func_code":"def countdown(num):\n i = num\n while i > 0:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8528,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:30:47","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":10071,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:30:47","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":22121,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:30:47","func_code":"def fibonacci(n):\n i = 0\n num = 1\n num1 = 1\n num2 = 1\n while i < n:\n if n == 0:\n return 0\n elif n == 1:\n return 1\n num = num3 + num2\n num2 = num3\n num3 = num\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":16505,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:31:13","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":7630,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:31:13","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":40910,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:31:13","func_code":"def countdown(num):\n i = num\n while i > 0:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":14749,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:31:13","func_code":"def fibonacci(n):\n i = 0\n num = 1\n num1 = 1\n num2 = 1\n while i < n:\n if n == 0:\n return 0\n elif n == 1:\n return 1\n num = num2 + num1\n num1 = num2\n num2 = num\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":19663,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:31:19","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10191,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:32:12","func_code":"def countdown(count):\n while count >= 1:\n print(count, 'LIFT OFF!\\n')\n time.sleep(0.1)\n count -= 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36868,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:32:21","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":29947,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:32:21","func_code":"def countdown(num):\n i = num\n while i > 0:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10990,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:32:21","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":39652,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:32:21","func_code":"def fibonacci(n):\n i = 0\n num = 1\n num1 = 1\n num2 = 1\n if n == 0:\n return 0\n elif n == 1:\n return 1\n while i < n:\n num = num2 + num1\n num1 = num2\n num2 = num\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":4509,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:32:32","func_code":"def countdown(count):\n while count >= 1:\n print(count, 'LIFT OFF!')\n time.sleep(0.1)\n count -= 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":40307,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:32:51","func_code":"def countdown(count):\n while count >= 1:\n print(count, end=' ')\n time.sleep(0.1)\n count -= 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28488,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:32:58","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":38947,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:32:58","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37364,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:32:58","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i < n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":21563,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:32:58","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":7950,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:33:02","func_code":"def countdown(num):\n i = 0\n x = num\n while i < num:\n print(x)\n time.sleep(0.1)\n x = x - 1\n i = i + 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29485,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:33:02","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16084,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":11798,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20201,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33651,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":30926,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":30731,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":3951,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7161,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:33:15","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":33294,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:33:19","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31637,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:33:28","func_code":"def countdown(num):\n i = num\n while i > 0:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32731,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:33:28","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":10873,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:33:28","func_code":"def fibonacci(n):\n i = 0\n num = 1\n num1 = 1\n num2 = 1\n if n == 0:\n return 0\n elif n == 1:\n return 1\n while i < n:\n num = num2 + num1\n num1 = num2\n num2 = num\n print(num)\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":15561,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:33:28","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":30552,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:33:40","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":7654,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:33:40","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":11003,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:33:40","func_code":"def countdown(num):\n i = 0\n x = num\n while i < num:\n print(x)\n time.sleep(0.1)\n x = x - 1\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":24457,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:33:40","func_code":"def countdown(num):\n i = 0\n x = num\n while i < num:\n print(x)\n time.sleep(0.1)\n x = x - 1\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10529,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:33:40","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9391,"user":"46396c6c-a25c-4fd6-ac1b-a1163f81f5f8","date":"2017-03-22 13:33:40","func_code":"def countdown(num):\n i = 0\n x = num\n while i < num:\n print(x)\n time.sleep(0.1)\n x = x - 1\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17026,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:33","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":24250,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:33","func_code":"def fibonacci(n):\n i = 2\n num = 1\n num1 = 1\n num2 = 1\n if n == 0:\n return 0\n elif n == 1:\n return 1\n while i < n:\n num = num2 + num1\n num1 = num2\n num2 = num\n print(num)\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":2367,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:33","func_code":"def countdown(num):\n i = num\n while i > 0:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23919,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:33","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":3963,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":30410,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":34344,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def index(string, letter):\n i = 0\n test = -1\n while i < len(string):\n if letter == string[i]:\n test = i\n i = i + 1\n return test","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":40801,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def countdown(num):\n i = num\n while i > 0:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15928,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def fibonacci(n):\n i = 2\n num = 1\n num1 = 1\n num2 = 1\n if n == 0:\n return 0\n elif n == 1:\n return 1\n while i < n:\n num = num2 + num1\n num1 = num2\n num2 = num\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":34512,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def countdown(num):\n i = num\n while i > 0:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":41791,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def search(string, letter):\n i = 0\n test = 1\n while i < len(string):\n if letter == string[i]:\n return True\n test = 2\n i = i + 1\n if test == 1:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":34800,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:34:50","func_code":"def fibonacci(n):\n i = 2\n num = 1\n num1 = 1\n num2 = 1\n if n == 0:\n return 0\n elif n == 1:\n return 1\n while i < n:\n num = num2 + num1\n num1 = num2\n num2 = num\n i = i + 1\n if n != 0 and n != 1:\n return num","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":39239,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:35:54","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5362,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:35:54","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":38572,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:38:20","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21605,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:38:32","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11839,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:38:32","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16494,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:39:10","func_code":"def countdown(num):\n print(num)\n if num != 0:\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33396,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-03-22 13:39:24","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":33820,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-03-22 13:39:24","func_code":"def countdown(num):\n i = 0\n x = num\n while i < num:\n print(x)\n time.sleep(0.1)\n x = x - 1\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23369,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-03-22 13:39:24","func_code":"def countdown(num):\n i = 0\n x = num\n while i < num:\n print(x)\n time.sleep(0.1)\n x = x - 1\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20870,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-03-22 13:39:24","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23838,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:39:39","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":41424,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:40:04","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n elif letter != string[-1]:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":2426,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:40:04","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5771,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:40:41","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28087,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:40:41","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":950,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:41:25","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36515,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:41:25","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":7979,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:42:13","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":1397,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:42:13","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":35488,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:17","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28595,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:17","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":20827,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:17","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":1922,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:17","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10480,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:42:32","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28593,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:42:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":34058,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:42:32","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":2857,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:46","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":12889,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:46","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":4266,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:46","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34419,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:42:46","func_code":"def search(str, letter, pos):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":28094,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":376,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":32283,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":15732,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":25477,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":7180,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":30248,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12029,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str) and str[i] != letter:\n i += 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":28571,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')\n return num","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":40464,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":38370,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":36883,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-22 13:43:16","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":42370,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:43:24","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":24527,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:43:24","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":18826,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:43:24","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":15214,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:43:41","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21291,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:43:41","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":22902,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:43:41","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":38873,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:43:43","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33415,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:43:55","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":16328,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:43:55","func_code":"def search(string, letter):\n i = 0\n if string[i] == letter:\n return True\n elif i < len(string):\n search(string[i + 1], letter)\n else:\n return False\n i = i + 1","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":3552,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:44:20","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return len[:i]\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":21321,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:44:20","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":38041,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:44:20","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10022,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:44:54","func_code":"def search(string, letter):\n i = 0\n if string[i] == letter:\n return True\n elif i < len(string):\n i = i + 1\n search(string[i + 1], letter)\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":42154,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:44:54","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37356,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:45:36","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29213,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:46:00","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":13295,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:46:00","func_code":"def index(str, letter):\n for item in ls:\n return str - 1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":30540,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:46:00","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6898,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:47:28","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":7498,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:47:28","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i += 1\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":13465,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:47:47","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30649,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:47:47","func_code":"def index(str, letter):\n for item in ls:\n return str - 1\n return index","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":15582,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:47:47","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":8521,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:48:38","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":17866,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:48:38","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34129,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:48:38","func_code":"def index(str, letter):\n for item in str:\n return str - 1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":833,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":40127,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9472,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":15019,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":40402,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19015,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":8306,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":41917,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26870,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23745,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":12678,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":5955,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-22 13:49:32","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":2634,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:49:37","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16125,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:49:37","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38885,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:49:37","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":13822,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:49:58","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":24121,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:49:58","func_code":"def search(string, letter):\n i = 0\n if string[i] == letter:\n return True\n else:\n search(string[i + 1], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":25026,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":30740,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":34282,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9652,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":13413,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":14331,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":5003,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33725,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37702,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-22 13:50:00","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":25680,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:09","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":39905,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:09","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38925,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:09","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":38669,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":30917,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":16770,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31567,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32924,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":39259,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":25661,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37172,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":24327,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-22 13:50:20","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return ls","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":3237,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:51:30","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":6802,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:51:30","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17940,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 13:51:30","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":17903,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:51:45","func_code":"def index(ls, letter):\n for item in ls:\n if item == -1:\n return index","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":38832,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:51:45","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":25285,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 13:51:45","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22660,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15277,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22991,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":25028,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31666,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":26501,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":39631,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":24584,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":12679,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-22 13:52:38","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":34911,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:52:47","func_code":"def fibonacci(n):\n n = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":6068,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:52:47","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":957,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:52:47","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":13082,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:52:47","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23471,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:52:53","func_code":"def search(string, letter):\n i = 0\n if string[i] == letter:\n return True\n else:\n i = i + 1\n search(string[i], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":1673,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:52:53","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38798,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":20078,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":19463,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":40679,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":25812,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36781,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":15011,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":28083,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":38920,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":30245,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26550,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":39805,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-22 13:53:06","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":2063,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:53:26","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11313,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:53:26","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":21029,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 13:53:26","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i += 1\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":28801,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23979,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":20828,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":28246,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":39609,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":31306,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":25396,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":39938,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":29333,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":30658,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":39887,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":21356,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-22 13:54:11","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36602,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2017-03-22 13:57:54","func_code":"def countdown(num):\n i = 0\n x = num\n while i < 1:\n print(x)\n time.sleep(0.1)\n x = x - 1\n i = i + 1\n print('LIFT OFF')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3483,"user":"f1bd9735-8e07-4248-830f-ae65dbe0a5c2","date":"2017-03-22 13:57:54","func_code":"def countdown(num):\n i = 0\n x = num\n while i < 1:\n print(x)\n time.sleep(0.1)\n x = x - 1\n i = i + 1\n print('LIFT OFF')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19179,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:58:22","func_code":"def search(string, letter, count):\n i = 0\n if string[i] == letter:\n return True\n else:\n count = i + 1\n search(string[count], letter, count)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":40269,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:58:22","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6022,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:59:30","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22122,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 13:59:30","func_code":"def search(string, letter):\n i = 0\n if string[i] == letter:\n return True\n else:\n count = i + 1\n search(string[count], letter, count)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":16066,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:02:13","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":42174,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:02:13","func_code":"def search(string, *letter):\n i = 0\n if string[i] == letter[0]:\n return True\n else:\n count = i + 1\n search(string[count], letter[0])","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":28621,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:03:19","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":33931,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:03:19","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23368,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:04:39","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":40837,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:04:39","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":37758,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:04:39","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23164,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:05:55","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17180,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:05:55","func_code":"def search(string, letter):\n if not i:\n i = 0\n if string[i] == letter:\n return True\n else:\n search(string[i + 1], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":11268,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:06:05","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":39684,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:06:05","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15627,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:06:05","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23077,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:07:41","func_code":"def search(string, letter):\n if i not in search():\n i = 0\n if string[i] == letter:\n return True\n else:\n search(string[i + 1], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":29706,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:07:41","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35919,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:09:35","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34560,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:09:35","func_code":"def search(string, letter):\n if 'i' not in locals():\n i = 0\n if string[i] == letter:\n return True\n else:\n search(string[i + 1], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":37144,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:10:23","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23520,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:10:23","func_code":"def search(string, letter):\n if 'i' not in locals():\n i = 0\n if string[i] == letter:\n return True\n elif i < len(string):\n search(string[i + 1], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":17316,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:11:01","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":16150,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:11:01","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9010,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:11:01","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31170,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:11:23","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9316,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:11:23","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34979,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:11:23","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":24062,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:11:57","func_code":"def search(string, letter):\n if 'i' not in locals():\n i = 0\n if string[i] == letter:\n return True\n elif i < len(string):\n search(string[i + 1], letter)\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":19865,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:11:57","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5490,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:13:38","func_code":"def fibonacci(n):\n i = 0\n while i < len(n):\n if n + 1 == n + 2:\n return i\n i += 1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":42030,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:13:38","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":26511,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:13:38","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":296,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:13:38","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":32255,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:15:02","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34913,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:15:02","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":4603,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:15:02","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":36622,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:15:02","func_code":"def fibonacci(n):\n i = 0\n while i < len(n - 1):\n if n + 1 == n + 2:\n return i\n i += 1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":19915,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:29:34","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":38228,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:29:34","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36346,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:29:34","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":1655,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:35:09","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":14017,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:35:09","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16589,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:35:09","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":40267,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:35:09","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n print(c)\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":35876,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:01","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":26198,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:01","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":3116,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:01","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28692,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:01","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":11548,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:51","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":6391,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:51","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":12945,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:51","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10581,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:36:51","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n print(n)\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7816,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:37:04","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":39953,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:37:04","func_code":"def search(string, letter):\n if string[0] == letter:\n return True\n test = 1\n else:\n search(string[1:], letter)\n if test != 1:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":11081,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:37:39","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10321,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:37:39","func_code":"def search(string, letter):\n if string[0] == letter:\n return True\n test = 1\n else:\n search(string[1:], letter)\n if test != 1:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":40921,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:37:41","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":29177,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:37:41","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29617,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:37:41","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":4448,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:37:41","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n print(n)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23038,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:38:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":7432,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:38:06","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":7696,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:38:06","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n print(c)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":8315,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:38:06","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12275,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:38:47","func_code":"def search(string, letter):\n test = 0\n if string[0] == letter:\n test = 1\n else:\n search(string[1:], letter)\n if test == 0:\n return False\n else:\n return True","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":21862,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:38:47","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36073,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:14","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n return c\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":40123,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:14","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36632,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:14","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":7773,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:14","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":18160,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:31","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33953,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:31","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":12941,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:31","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":14378,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:39:31","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":36387,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:01","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":42112,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:01","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":12113,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:01","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":41026,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:01","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(1, n + 1):\n c = a + b\n return a\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7135,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:44","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9734,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:44","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":12243,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:44","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n[i]\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":29068,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:44","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15648,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:58","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":4018,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:58","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":17568,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:58","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":31530,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:40:58","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":9301,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:29","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":31730,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:29","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":1109,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:29","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return len(n)\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":15291,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:29","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33576,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:41","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":42248,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:41","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":33465,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:41","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33062,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:41:41","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":35539,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:42:43","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":1726,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:42:43","func_code":"def search(string, letter):\n if string == []:\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":22294,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:10","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":23251,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:10","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":8025,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:10","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return b\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":28042,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:10","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6631,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":23441,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:33","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":30684,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:33","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3153,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:43:33","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":3698,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:43:44","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":29474,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:43:44","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":1311,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:45:10","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":31663,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:45:10","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":41308,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:45:10","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":7168,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:45:10","func_code":"def fibonacci(n):\n count = 0\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return count\n a = b\n b = c\n count += 1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33617,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:47:16","func_code":"def search(string, letter, pos):\n if pos == len(string):\n return False\n elif string[pos] == letter:\n return True\n else:\n search(string, letter, pos + 1)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":37856,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:47:16","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17319,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:01","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":30826,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:01","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21814,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:01","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":24079,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:01","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":11890,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:23","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":22422,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:23","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n + 2\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":12951,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:23","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32035,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:48:23","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":36595,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":39997,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i += 1\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":2079,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":534,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":20215,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":6060,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i += 1\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":5580,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":18674,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 14:48:35","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":2529,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:49:22","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":25896,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:49:22","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":16957,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":33625,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":16437,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6458,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":22004,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":23014,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":30808,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":39709,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":42100,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":1751,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19413,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":35747,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-22 14:52:26","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26339,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:58:07","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3214,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:58:07","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":21587,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:58:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n ans = fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":42094,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:58:39","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":7874,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:58:39","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":35513,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 14:58:39","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10935,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:58:45","func_code":"def countdown(num):\n i = 0\n while num > i:\n print(num)\n time.sleep(0.1)\n num -= 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31929,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:58:45","func_code":"def search(str, letter):\n for char in str:\n if char == letter:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":2145,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:58:45","func_code":"def fibonacci(n):\n old = 1\n cur = 1\n i = 1\n while i < n:\n cur, old, i = cur + old, cur, i + 1\n return cur","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":11976,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:58:45","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":37546,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:59:28","func_code":"def search(str, letter):\n for char in str:\n if char == letter:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":31809,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:59:28","func_code":"def fibonacci(n):\n old = 1\n cur = 1\n i = 1\n while i < n:\n cur, old, i = cur + old, cur, i + 1\n return cur","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":18856,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:59:28","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":13741,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 14:59:28","func_code":"def countdown(num):\n i = 0\n while num > i:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":2114,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:01:38","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":13997,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:01:38","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":291,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:01:38","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8468,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:01:38","func_code":"def index(string, letter, pos):\n if pos == len(string):\n return -1\n elif string[pos] == letter:\n return pos\n else:\n return index(string, letter, pos)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":37384,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:02:47","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":14530,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:02:47","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":25341,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:02:47","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":23394,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:02:47","func_code":"def index(string, letter, pos):\n if pos == len(string):\n return -1\n elif string[pos] == letter:\n return pos\n else:\n index(string, letter, pos)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":7649,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:03:32","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":4695,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:03:32","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":8808,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:03:32","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":2807,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:03:32","func_code":"def index(string, letter, pos):\n if pos == len(string):\n return -1\n elif string[pos] == letter:\n return pos\n else:\n index(string, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":40031,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:07:08","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38589,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:07:47","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26679,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:07:47","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":11560,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:07:47","func_code":"def index(string, letter, count):\n if count == len(string) - 1:\n return -1\n elif string[count] == letter:\n return count\n else:\n index(string, letter, count + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":12477,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:07:47","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":7422,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:07:58","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":2680,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:07:58","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":13725,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:10:16","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":15371,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:10:16","func_code":"def index(string, letter, count):\n print(count)\n if count == len(string) - 1:\n return -1\n elif string[count] == letter:\n return count\n else:\n index(string, letter, count + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":39669,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:10:16","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19816,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:10:16","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":10855,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:11:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":37796,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:11:33","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23380,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:11:33","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":19180,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:11:42","func_code":"def index(string, letter, count):\n print(count)\n k = len(string)\n if count == k:\n return -1\n elif string[count] == letter:\n return count\n else:\n index(string, letter, count + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":11186,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:11:42","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":30716,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:11:42","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":10806,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:11:42","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":13092,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:11:51","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31332,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:11:51","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":19577,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:11:51","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":17084,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:16","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":36072,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:16","func_code":"def index(string, letter, count):\n print(count)\n k = len(string)\n if count == k:\n print(-1)\n elif string[count] == letter:\n print(count)\n else:\n index(string, letter, count + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":12908,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:16","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33875,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:16","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":24119,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:29","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10739,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:29","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":1394,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:29","func_code":"def index(string, letter, count):\n k = len(string)\n if count == k:\n print(-1)\n elif string[count] == letter:\n print(count)\n else:\n index(string, letter, count + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":2942,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:12:29","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":2422,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26023,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":13240,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":6416,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":25162,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":27158,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":37111,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":16524,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":19932,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":40672,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":5430,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":13528,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-22 15:13:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":30595,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:05","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":6539,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:05","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":27475,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:05","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31642,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:05","func_code":"def index(string, letter, count):\n print(count)\n k = len(string)\n if count == k:\n return -1\n elif string[count] == letter:\n return count\n else:\n return index(string, letter, count + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":38764,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:18","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":33913,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:18","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":14672,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:18","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38586,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:18","func_code":"def index(string, letter, count):\n k = len(string)\n if count == k:\n return -1\n elif string[count] == letter:\n return count\n else:\n return index(string, letter, count + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":6716,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":40446,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":41068,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def index(string, letter, count):\n k = len(string)\n if count == k:\n return -1\n elif string[count] == letter:\n return count\n else:\n return index(string, letter, count + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":16354,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8882,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def countdown(num):\n if num != 0:\n print(num)\n countdown(num - 1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20756,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":29248,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def index(string, letter, count):\n k = len(string)\n if count == k:\n return -1\n elif string[count] == letter:\n return count\n else:\n return index(string, letter, count + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":12092,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":40103,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def index(string, letter, count):\n k = len(string)\n if count == k:\n return -1\n elif string[count] == letter:\n return count\n else:\n return index(string, letter, count + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":22501,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9161,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":35446,"user":"e787ded7-43af-4b69-82c1-c646ab388711","date":"2017-03-22 15:14:33","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":6318,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 15:29:07","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15723,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:37:12","func_code":"def search(str, letter):\n for char in str:\n if char == letter:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":9634,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:37:12","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":34523,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:37:12","func_code":"def countdown(num):\n i = 0\n while num > i:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6721,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:37:12","func_code":"def fibonacci(n):\n old = 1\n cur = 1\n i = 1\n while i < n:\n cur, old, i = cur + old, cur, i + 1\n return cur","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":5474,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 15:44:05","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11269,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 15:44:05","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":38239,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:54:36","func_code":"def search(str, letter):\n for c in str:\n if c == letter:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":30342,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:54:36","func_code":"def fibonacci(n):\n i = 0\n while n > i:\n n","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":16691,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:54:36","func_code":"def countdown(num):\n i = 0\n while num > i:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20939,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:54:36","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":17673,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def fibonacci(n):\n if n == 0:\n return n\n elif n == 1:\n return n\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":32173,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def fibonacci(n):\n if n == 0:\n return n\n elif n == 1:\n return n\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":6801,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":34768,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5732,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":5746,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def fibonacci(n):\n if n == 0:\n return n\n elif n == 1:\n return n\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":965,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":24227,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":24858,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28725,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":1239,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":25776,"user":"9b929794-1500-4125-bf6c-79d74c111918","date":"2017-03-22 15:55:27","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":4805,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 15:57:45","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15329,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 15:57:45","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":18880,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 15:57:45","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":29037,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:59:55","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":37048,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:59:55","func_code":"def search(str, letter):\n for c in str:\n if c == letter:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":26117,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 15:59:55","func_code":"def countdown(num):\n i = 0\n while num > i:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26721,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:00:43","func_code":"def countdown(num):\n i = 0\n while num > i:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":495,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:00:43","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":30639,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:00:43","func_code":"def search(str, letter):\n for c in str:\n if letter == c:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":24319,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:02:08","func_code":"def countdown(num):\n i = 0\n while num > i:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5082,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:02:08","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":32252,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:02:08","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":41686,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":10278,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def countdown(num):\n i = 0\n while num > i:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":14183,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":36658,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":8573,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":5666,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":36904,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def index(str, letter):\n start = len(str) - 1\n end = -1\n while start > end:\n if letter == str[start]:\n return start\n else:\n start -= 1\n return end","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":32839,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:11:30","func_code":"def countdown(num):\n i = 0\n while num > i:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":27872,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30117,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":37190,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":16538,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5984,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":6208,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":13090,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":29738,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28329,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":9092,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":1054,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":11156,"user":"b9e7e608-6036-4d44-8770-a7036176b53c","date":"2017-03-22 16:13:16","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":4774,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:20:59","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('TAKE OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":41473,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:29:08","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":8651,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:29:08","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33089,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:47:00","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":22357,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:47:00","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8416,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:47:00","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":35084,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:47:00","func_code":"def index(str, letter):\n a = len(str) - 1\n b = -1\n if letter == str[a]:\n return start\n else:\n a -= 1\n index(str, letter)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":24404,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:50:53","func_code":"def index(str, letter, pos):\n if letter == str[pos]:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":25917,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:50:53","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":1129,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:50:53","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":28266,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:50:53","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":33716,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23620,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":25890,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":5760,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def index(str, letter, pos):\n pos = 0\n if letter == str[pos]:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":4479,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":8272,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":26281,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":16601,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32722,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def index(str, letter, pos):\n pos = 0\n if letter == str[pos]:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":35671,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":4147,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16911,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-22 16:51:22","func_code":"def index(str, letter, pos):\n pos = 0\n if letter == str[pos]:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":30973,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:21:48","func_code":"def fibonacci(n):\n fib = [0, 1]\n i = 2\n while i < n + 1:\n tmp = int(fib[i - 2]) + int(fib[i - 1])\n fib.append(tmp)\n i += 1\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":10804,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:21:48","func_code":"def search(string, letter):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":14710,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:21:48","func_code":"def index(string, letter):\n if letter in string:\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":6968,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:21:48","func_code":"def countdown(num):\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n return 'LIFT OFF!'","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32735,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def search(string, letter):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":808,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def index(string, letter):\n if letter in string:\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":36203,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def index(string, letter):\n if letter in string:\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":40752,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def fibonacci(n):\n fib = [0, 1]\n i = 2\n while i < n + 1:\n tmp = int(fib[i - 2]) + int(fib[i - 1])\n fib.append(tmp)\n i += 1\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":24308,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def countdown(num):\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21025,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def search(string, letter):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":11182,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def fibonacci(n):\n fib = [0, 1]\n i = 2\n while i < n + 1:\n tmp = int(fib[i - 2]) + int(fib[i - 1])\n fib.append(tmp)\n i += 1\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":31819,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def countdown(num):\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32114,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def fibonacci(n):\n fib = [0, 1]\n i = 2\n while i < n + 1:\n tmp = int(fib[i - 2]) + int(fib[i - 1])\n fib.append(tmp)\n i += 1\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":17675,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def search(string, letter):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":24280,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def index(string, letter):\n if letter in string:\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":36144,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-22 22:22:29","func_code":"def countdown(num):\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30200,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-23 15:48:35","func_code":"def swap_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":37212,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-23 15:48:35","func_code":"def swap_keys_values(d):\n new_d = {v: k for k, v in list(d.items())}\n return new_d","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":13009,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-23 15:50:50","func_code":"def swap_unique_keys_values(d):\n seen = {}\n result = {}\n for k, v in list(d.items()):\n if v in seen:\n del seen[v]\n else:\n seen[v] = k\n result[v] = k\n return seen","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":19219,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-23 15:50:50","func_code":"def swap_unique_keys_values(d):\n seen = {}\n result = {}\n for k, v in list(d.items()):\n if v in seen:\n del seen[v]\n else:\n seen[v] = k\n result[v] = k\n return seen","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":36799,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 18:57:43","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38417,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 18:58:10","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12668,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 18:58:41","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26276,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:00:19","func_code":"def search(str, letter):\n if letter in str:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":37512,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:00:19","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30750,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:01:55","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19306,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:01:55","func_code":"def search(str, letter):\n if letter in str:\n print('True')\n elif letter not in str:\n print('False')","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":8133,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:07:34","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n break\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":28337,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:07:34","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17525,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:08:04","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15930,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:08:04","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":38012,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:08:35","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n break\n print('True')\n else:\n print('False')\n i += 1","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":41004,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:08:35","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33379,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:09:29","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28579,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:09:29","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n print('True')\n else:\n print('False')\n i += 1","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":41624,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:10:30","func_code":"def search(str, letter):\n if letter in str:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":22352,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:10:30","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8618,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:11:04","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34002,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:11:04","func_code":"def search(str, letter):\n if letter in str:\n print('True'.rstrip())\n else:\n print('False'.rstrip())","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":22433,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:12:20","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":6635,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:12:20","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":1468,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:15:28","func_code":"def index(str, letter):\n return str.index(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":38168,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:15:28","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":13839,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:15:28","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":978,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:18:16","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":32387,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:18:16","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":7683,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:18:16","func_code":"def index(str, letter):\n return str.find(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":22045,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:23:07","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26979,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:23:07","func_code":"def index(str, letter):\n return str.find(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":31447,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:23:07","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":34271,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:23:07","func_code":"def fibonacci(n):\n a = 1\n b = 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":18036,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def fibonacci(n):\n a = 1\n b = 1\n if n != 0:\n for i in range(n - 1):\n a, b = b, a + b\n else:\n return 0\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":33001,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def index(str, letter):\n return str.find(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":1136,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def index(str, letter):\n return str.find(letter)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":14096,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":22160,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32840,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def fibonacci(n):\n a = 1\n b = 1\n if n != 0:\n for i in range(n - 1):\n a, b = b, a + b\n else:\n return 0\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":26995,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":882,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:24:09","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20786,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:25:36","func_code":"def index(str, letter):\n return str.find(letter)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":38548,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:25:36","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":24829,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:25:36","func_code":"def fibonacci(n):\n a = 1\n b = 1\n if n != 0:\n for i in range(n - 1):\n a, b = b, a + b\n else:\n return 0\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":24466,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:25:36","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20094,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23614,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":37659,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def fibonacci(n):\n a = 1\n b = 1\n if n != 0:\n for i in range(n - 1):\n a, b = b, a + b\n else:\n return 0\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":33871,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def index(str, letter, n):\n return str.find(letter)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":38240,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def index(str, letter, n):\n return str.find(letter)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":493,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def countdown(num):\n import time\n while num > 0:\n print(num)\n time.sleep(0.1)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":1249,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def fibonacci(n):\n a = 1\n b = 1\n if n != 0:\n for i in range(n - 1):\n a, b = b, a + b\n else:\n return 0\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":36124,"user":"7761b9ac-f093-487b-8401-cf2d01636e78","date":"2017-03-23 19:26:12","func_code":"def search(str, letter):\n if letter in str:\n return 'True'.rstrip()\n else:\n return 'False'.rstrip()","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":28823,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-24 12:45:45","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":30754,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-24 12:45:45","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":1720,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-03-24 12:45:45","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":24528,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:21:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n elif n == 2:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":2313,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:21:03","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":8409,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:21:03","func_code":"def index(string, letter, pos=0):\n if string == '':\n return '-1'\n elif string[0] == letter:\n return pos\n else:\n pos += 1\n return index(string[1:], letter, pos=pos)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":26878,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:21:03","func_code":"def countdown(num):\n if num == 0:\n return 'LIFT OFF!'\n else:\n print(num)\n num = num - 1\n time.sleep(0.1)\n return countdown(num)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35739,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def index(string, letter, pos=0):\n if string == '':\n return '-1'\n elif string[0] == letter:\n return pos\n else:\n pos += 1\n return index(string[1:], letter, pos=pos)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":41906,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n elif n == 2:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":23982,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":33237,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n elif n == 2:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":23672,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":37895,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def index(string, letter, pos=0):\n if string == '':\n return '-1'\n elif string[0] == letter:\n return pos\n else:\n pos += 1\n return index(string[1:], letter, pos=pos)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":24751,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def search(string, letter):\n if string == '':\n return False\n elif string[0] == letter:\n return True\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":36438,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n num = num - 1\n time.sleep(0.1)\n return countdown(num)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35208,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def index(string, letter, pos=0):\n if string == '':\n return '-1'\n elif string[0] == letter:\n return pos\n else:\n pos += 1\n return index(string[1:], letter, pos=pos)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":20654,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n num = num - 1\n time.sleep(0.1)\n return countdown(num)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17438,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n elif n == 2:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":1341,"user":"813b8c22-4514-4fed-ac48-d5a7a4b068dd","date":"2017-03-24 16:22:07","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n num = num - 1\n time.sleep(0.1)\n return countdown(num)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":7001,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-26 11:18:40","func_code":"def countdown(num):\n i = num\n while i > 1:\n return i\n i = i - 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26002,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-26 11:19:18","func_code":"def countdown(num):\n i = num\n while i > 1:\n return i\n i = i - 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36824,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-26 11:19:18","func_code":"def countdown(num):\n i = num\n while i > 1:\n return i\n i = i - 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15544,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-26 11:19:18","func_code":"def countdown(num):\n i = num\n while i > 1:\n return i\n i = i - 1","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":42151,"user":"1b62c11e-ae6b-4c7f-8eac-f8a9a0acb450","date":"2017-03-26 20:12:18","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":561,"user":"1b62c11e-ae6b-4c7f-8eac-f8a9a0acb450","date":"2017-03-26 20:16:40","func_code":"def reverse(a):\n i = len(a) - 1\n new_array = []\n while i >= 0:\n new_array.append(a[i])\n i -= 1\n return new_array","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":37674,"user":"1b62c11e-ae6b-4c7f-8eac-f8a9a0acb450","date":"2017-03-26 20:18:49","func_code":"def reverse(a):\n i = len(a) - 1\n new_array = []\n while i >= 0:\n new_array.append(a[i])\n i -= 1\n return new_array","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":35872,"user":"1b62c11e-ae6b-4c7f-8eac-f8a9a0acb450","date":"2017-03-26 20:18:49","func_code":"def reverse(a):\n i = len(a) - 1\n new_array = []\n while i >= 0:\n new_array.append(a[i])\n i -= 1\n return new_array","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":29303,"user":"1b62c11e-ae6b-4c7f-8eac-f8a9a0acb450","date":"2017-03-26 20:18:49","func_code":"def reverse(a):\n i = len(a) - 1\n new_array = []\n while i >= 0:\n new_array.append(a[i])\n i -= 1\n return new_array","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":39556,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:04:42","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":17674,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:04:42","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":32826,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:04:42","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":7284,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:04:42","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":4083,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:05:00","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":21494,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:05:00","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":34632,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:05:00","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":28326,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:05:00","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12064,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:06:55","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":15599,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:06:55","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":7786,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:06:55","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return c\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":40721,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:06:55","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":16678,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:08:51","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26052,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:08:51","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":3398,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:08:51","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":24414,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:08:51","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return c + 1\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":11744,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:09:09","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":33589,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:09:09","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22609,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:09:09","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":17802,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:09:09","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":30626,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:19:38","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":18894,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:19:38","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":15858,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:19:38","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37971,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:20:28","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":5742,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:20:28","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31000,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:20:28","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":14753,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:25:14","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n + 1):\n c = a + b\n return n\n a = b\n b = c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":32593,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:25:14","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":22343,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:25:14","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":35596,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:25:14","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":18447,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:29:03","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":35252,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:29:03","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":11467,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:29:03","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":7334,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:29:32","func_code":"def fibonacci(n):\n i = 0\n while i < len(n):\n if n[i] == 0:\n return i\n i += 1\n return c\n c = i + 1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":18973,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:29:32","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":2453,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:29:32","func_code":"def fibonacci(n):\n i = 0\n while i < len(n):\n if n[i] == 0:\n return i\n i += 1\n return c\n c = i + 1\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":5601,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:29:32","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8411,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:13","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3655,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:13","func_code":"def fibonacci(n):\n i = 0\n while i < n:\n if n[i] == 0:\n return i\n i += 1\n return c\n c = i + 1\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":40854,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:13","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":41841,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:13","func_code":"def fibonacci(n):\n i = 0\n while i < n:\n if n[i] == 0:\n return i\n i += 1\n return c\n c = i + 1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":20253,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:34","func_code":"def fibonacci(n):\n i = 0\n c = i + 1\n while i < n:\n if n[i] == 0:\n return i\n i += 1\n return c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":36784,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:34","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5368,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:34","func_code":"def fibonacci(n):\n i = 0\n c = i + 1\n while i < n:\n if n[i] == 0:\n return i\n i += 1\n return c\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":33146,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:34","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":330,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:57","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28846,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:57","func_code":"def fibonacci(n):\n i = 0\n c = i + 1\n while i < n:\n if n == 0:\n return i\n i += 1\n return c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":12614,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:57","func_code":"def fibonacci(n):\n i = 0\n c = i + 1\n while i < n:\n if n == 0:\n return i\n i += 1\n return c\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":4048,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:30:57","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":28722,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:00","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":16273,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:00","func_code":"def fibonacci(n):\n i = 0\n x = 1\n c = i + x\n while i < n:\n if n == 0:\n return i\n i += 1\n return c\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":26189,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:00","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":2711,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:00","func_code":"def fibonacci(n):\n i = 0\n x = 1\n c = i + x\n while i < n:\n if n == 0:\n return i\n i += 1\n return c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":329,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:25","func_code":"def fibonacci(n):\n i = 0\n x = 1\n c = i + x\n while i < n:\n if n == 0:\n return i\n i += 1\n c += 1\n return c\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":30392,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:25","func_code":"def fibonacci(n):\n i = 0\n x = 1\n c = i + x\n while i < n:\n if n == 0:\n return i\n i += 1\n c += 1\n return c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":20631,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:25","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9207,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:25","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3230,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:41","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9084,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:41","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":2197,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:41","func_code":"def fibonacci(n):\n i = 0\n x = 1\n c = i + x\n while i < n:\n if n == 0:\n return i\n i += 1\n c += 1\n return c\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":17294,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:32:41","func_code":"def fibonacci(n):\n i = 0\n x = 1\n c = i + x\n while i < n:\n if n == 0:\n return i\n i += 1\n c += 1\n return c","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":32472,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:35:46","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":26235,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:35:46","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":39842,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:35:46","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":24204,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:35:46","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26015,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:29","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]\n\n\ndef index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":35148,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:29","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35009,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:29","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":39526,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:29","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":19280,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:41","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5673,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:41","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":26241,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:41","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":8867,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:36:41","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":15348,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:40:42","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":8794,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:40:42","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35701,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:40:42","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":1624,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:40:42","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":27154,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:45:44","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":22929,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:45:44","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":34401,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:45:44","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":25869,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:45:44","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30720,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:46:10","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":26973,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:46:10","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":32372,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:46:10","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17649,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:46:10","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":20597,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:06","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37182,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":35349,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:06","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":21652,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:06","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":20193,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:31","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31583,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:31","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":25063,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:31","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":36105,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:31","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":19420,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:45","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23863,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:45","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15679,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:45","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":17100,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:45","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":31933,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:58","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":42042,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:58","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":18804,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:58","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":11603,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:47:58","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":10700,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:48:43","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":8629,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:48:43","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":1570,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:48:43","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":21322,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:48:43","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":41064,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:49:29","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":161,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:49:29","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":13655,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:49:29","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":11378,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:49:29","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":27989,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":7715,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":29809,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":20244,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":17032,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":15743,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10517,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":27418,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 12:53:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":11103,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:30","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":17401,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:30","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":35308,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:30","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":33962,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:30","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32832,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:57","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":40788,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:57","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12968,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:57","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":4250,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 12:55:57","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":34260,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:19","func_code":"def fibonacci(n):\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n print(a)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":27230,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:19","func_code":"def countdown(num):\n print('calling countdown(' + str(num) + ')')\n while num > 0:\n time.sleep(0.1)\n print(num)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":16643,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:19","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":6307,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:19","func_code":"def index(str, letter):\n if letter in str:\n print(str.index(letter))\n else:\n print(-1)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":7326,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:47","func_code":"def index(str, letter):\n if letter in str:\n print(str.index(letter))\n else:\n print(-1)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":12087,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:47","func_code":"def fibonacci(n):\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n print(a)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":30752,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:47","func_code":"def search(str, letter):\n if letter in str:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":3216,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:56:47","func_code":"def countdown(num):\n while num > 0:\n time.sleep(0.1)\n print(num)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":39777,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:59:13","func_code":"def index(s, letter):\n if letter in s:\n print(str.index(letter))\n else:\n print(-1)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":10917,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:59:13","func_code":"def countdown(num):\n while num > 0:\n time.sleep(0.1)\n print(num)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":41561,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:59:13","func_code":"def search(s, letter):\n if letter in s:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":41821,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 12:59:13","func_code":"def fibonacci(n):\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":5414,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 13:00:02","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":26957,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 13:00:02","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":17830,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 13:00:02","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32063,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 13:00:02","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":139,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:00:10","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":14366,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:00:10","func_code":"def index(s, letter):\n if letter in s:\n print(s.index(letter))\n else:\n print(-1)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":3163,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:00:10","func_code":"def countdown(num):\n while num > 0:\n time.sleep(0.1)\n print(num)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":14757,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:00:10","func_code":"def search(s, letter):\n if letter in s:\n print(True)\n else:\n print(False)","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":22080,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:01:16","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":40751,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:01:16","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":31963,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:01:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n else:\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":33984,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:01:16","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":19515,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:02:23","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":12658,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:02:23","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32977,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:02:23","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":36792,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:02:23","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":12812,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:25","func_code":"def countdown(num):\n while num > 0:\n time.sleep(0.1)\n print(num)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":16982,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:25","func_code":"def search(s, letter):\n print(letter in s)","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":19511,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:25","func_code":"def index(s, letter):\n if letter in s:\n print(s.index(letter))\n else:\n print(-1)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":11544,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:25","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":27673,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:54","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23341,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:54","func_code":"def countdown(num):\n while num > 0:\n time.sleep(0.1)\n print(num)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12334,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:54","func_code":"def index(s, letter):\n if letter in s:\n print(s.index(letter))\n else:\n print(-1)","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":4034,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:02:54","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":14309,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:08","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16069,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:08","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":7751,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:08","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":26723,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:08","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32269,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:23","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":41751,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:23","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29695,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:23","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":3432,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:03:23","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":2013,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:45","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":822,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:45","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":19237,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:45","func_code":"def countdown(num):\n while num > 0:\n time.sleep(0.1)\n return num\n num -= 1\n return 'LIFT OFF!'","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":4085,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:45","func_code":"def index(s, letter):\n if letter in s:\n return s.index(letter)\n else:\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":15680,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":29401,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":25711,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":32129,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":14182,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def index(s, letter):\n if letter in s:\n return s.index(letter)\n else:\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":8799,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def countdown(num):\n while num > 0:\n time.sleep(0.1)\n print(num)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3727,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def index(s, letter):\n if letter in s:\n return s.index(letter)\n else:\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":37092,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:03:59","func_code":"def countdown(num):\n while num > 0:\n time.sleep(0.1)\n print(num)\n num -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":27088,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:07:14","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":24836,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:07:14","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":28728,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:07:14","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":40851,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:07:14","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30574,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:12:47","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n return\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20348,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:12:47","func_code":"def index(s, letter):\n if letter in s:\n return s.index(letter)\n else:\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":22129,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:12:47","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":29813,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:12:47","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":17181,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:17:56","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":11849,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:17:56","func_code":"def index(s, letter, num):\n if num == len(s):\n print(-1)\n return\n if s[num] == letter:\n print(num)\n return\n index(s, letter, num + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":6471,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:17:56","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n return\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32751,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:17:56","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":5632,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:18:28","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n return\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28407,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:18:28","func_code":"def index(s, letter, num):\n if num == len(s):\n return -1\n if s[num] == letter:\n return num\n index(s, letter, num + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":23340,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:18:28","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":25839,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:18:28","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":27014,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:19:18","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":25954,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:19:18","func_code":"def index(s, letter, num):\n if num == len(s):\n return -1\n if s[num] == letter:\n return num\n index(s, letter, num + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":35259,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:19:18","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":42224,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:19:18","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n return\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29867,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":20550,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def index(s, letter, num):\n if num == len(s):\n return -1\n if s[num] == letter:\n return num\n n = index(s, letter, num + 1)\n return n","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":10380,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":24071,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def index(s, letter, num):\n if num == len(s):\n return -1\n if s[num] == letter:\n return num\n n = index(s, letter, num + 1)\n return n","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":2314,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":19133,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":33798,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n return\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36629,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":37276,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n return\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15027,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def index(s, letter, num):\n if num == len(s):\n return -1\n if s[num] == letter:\n return num\n n = index(s, letter, num + 1)\n return n","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":20945,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def search(s, letter):\n return letter in s","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9731,"user":"aaa0b462-c89e-49f8-8886-ec2961496a19","date":"2017-03-27 13:20:14","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n return\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21181,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:21:02","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":34758,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:21:02","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37888,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:21:02","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":25166,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:21:02","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":11696,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:10","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":6283,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:10","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":32804,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:10","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19072,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:10","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":8621,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:43","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38143,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:43","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":1149,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:43","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":18636,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:26:43","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":34657,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:27:14","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20630,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:27:14","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":24257,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:27:14","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":13441,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:27:14","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":24210,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:28:13","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":33622,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:28:13","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5698,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:28:13","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":26703,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:28:55","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":36804,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:28:55","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":22783,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:28:55","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":37906,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:28:55","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10004,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:09","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":4741,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:09","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":28067,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:09","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":17819,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:09","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22512,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:32","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30673,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:32","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":3554,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:32","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":7576,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:29:32","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":25014,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:05","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11416,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:05","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":27595,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:05","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":38922,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:05","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":35740,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":5974,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:33","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22124,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:33","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":18109,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:32:33","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":338,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:37:09","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":33976,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:37:09","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":25170,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:37:09","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37997,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:37:09","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":33030,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:34","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":21506,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:34","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8691,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:34","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":2384,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:34","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":12058,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9469,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":31805,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":7381,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":24373,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38670,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":5402,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":16411,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:38:50","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36744,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:39:22","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35742,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:39:22","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":36411,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:39:22","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":5519,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:39:22","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":13494,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3402,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":36746,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21454,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":26391,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16444,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def index(str, letter, num):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":8855,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10327,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":35609,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def index(str, letter, num):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":38626,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":30074,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":31321,"user":"3db8d602-4800-4b13-9482-3fb9643a4588","date":"2017-03-27 13:46:20","func_code":"def index(str, letter, num):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":13963,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:52:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":22183,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:52:32","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":11380,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:52:32","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6455,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:52:32","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n - i:\n x = i\n i = i + z\n z = x\n print(i)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":420,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:57:13","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":14324,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:57:13","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28448,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:57:13","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":8036,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:57:13","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n - i:\n x = i\n i = i + z\n z = x\n print(i)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":18346,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:58:31","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":2357,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:58:31","func_code":"def fibonacci(n):\n i = 1\n j = 0\n k = 0\n while i < n - i:\n k = i\n i = j + i\n j = k\n print(i)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33156,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:58:31","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":13486,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 13:58:31","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":16251,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:00:10","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n print(i)\n print(z)\n print(x)\n while i < n - i:\n x = i\n i = i + z\n z = x\n print(i)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":22417,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:00:10","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":2244,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:00:10","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":548,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:00:10","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3317,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:01:06","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":41465,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:01:06","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36511,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:01:06","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n - i:\n x = i\n i = i + z\n z = x\n print(i)\n print(z)\n print(x)\n print(i)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":17699,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:01:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":16135,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:02:22","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34964,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:02:22","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n - i:\n x = i\n i = i + z\n z = x\n print(str(i))","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":37397,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:02:22","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":15521,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:02:22","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":22337,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:05:47","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":1658,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:05:47","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":32184,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:05:47","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":1067,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:05:47","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n:\n x = i\n i = i + z\n z = x\n print(i)\n print(z)\n print(x)\n print(str(i))","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":12367,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:18","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":10818,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:18","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5845,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:18","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n:\n x = i\n i = i + z\n z = x\n return i","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33031,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:18","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":36417,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:49","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34548,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:49","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":18310,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:49","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n:\n x = i\n i = i + z\n z = x\n return x","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":2135,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:07:49","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":17678,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:08:06","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":33024,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:08:06","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19599,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:08:06","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n while i < n:\n x = i\n i = i + z\n z = x\n return z","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":37965,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:08:06","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":5697,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:37","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return z\n else:\n return 0","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":6649,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:37","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":28736,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:37","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":6735,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:37","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33823,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":19270,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7767,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":42277,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":42192,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":8121,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":27229,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":18716,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 14:09:53","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":3872,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:21:55","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":42420,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:21:55","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15453,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:21:55","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23669,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:21:55","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":19192,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16255,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26616,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":4785,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":8659,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def index(str, letter, x):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":18896,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def index(str, letter, x):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":22860,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":27889,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def index(str, letter, x):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":34464,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":36712,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":41254,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":34592,"user":"329aa290-1bfb-4cf3-82e0-ca13ee54db0f","date":"2017-03-27 15:24:26","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33548,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 15:39:28","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n c = letter[0]\n for ch in str:\n if ch == c:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":25625,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 15:39:28","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20182,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 15:39:28","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":6967,"user":"52070898-b2dd-4882-a9a9-65bd9d55725a","date":"2017-03-27 15:39:28","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":31458,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:12","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":36230,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:12","func_code":"def countdown(num):\n while num > 1:\n print(num)\n num -= num\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33040,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:12","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":2795,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:12","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n x = letter[0]\n for ch in str:\n if ch == x:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":35094,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:50","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n x = letter[0]\n for ch in str:\n if ch == x:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":26172,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:50","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":3853,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:50","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":6625,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:46:50","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num -= num\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19036,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":31871,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3828,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":38021,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26961,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n x = letter[0]\n for ch in str:\n if ch == x:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":41019,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":7976,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n x = letter[0]\n for ch in str:\n if ch == x:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":7835,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":14912,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":37163,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n num = num - 1\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20585,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def index(str, letter):\n i = 0\n if letter in str:\n x = letter[0]\n for ch in str:\n if ch == x:\n if str[i:i + len(letter)] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":14276,"user":"73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36","date":"2017-03-27 15:47:40","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":31442,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:33","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":35310,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:33","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5039,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:33","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fin[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":1978,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:33","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9692,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":21256,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11627,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":3499,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":16334,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":41298,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":18460,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":36653,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 15:59:48","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":39614,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:03:44","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":13204,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:03:44","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":17242,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:03:44","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":15958,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:03:44","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":20711,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":20601,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":35273,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def index(str, letter, num):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":21507,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":32436,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12096,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":40351,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def search(ls, val):\n for item in ls:\n if item == val:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":6512,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":38578,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def index(str, letter, num):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":41230,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38613,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33034,"user":"77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f","date":"2017-03-27 16:04:47","func_code":"def index(str, letter, num):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":1583,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:43:38","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":17162,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:43:38","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":28114,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:43:38","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29458,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:43:38","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":42482,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":3598,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":20525,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3639,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":3126,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":4471,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22237,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":18899,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":23299,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":17314,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return True\n i += 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":22303,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def countdown(count):\n while count >= 1:\n print(count)\n time.sleep(0.1)\n count -= 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35291,"user":"df44f889-e513-4dcf-9230-82eca3e43f36","date":"2017-03-27 17:47:48","func_code":"def fibonacci(n):\n fib = [0, 1, 1]\n for f in range(2, n):\n fib.append(fib[-1] + fib[-2])\n return fib[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":15433,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 17:48:22","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n time.sleep(0.1)\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11630,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 17:58:08","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n time.sleep(0.1)\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31313,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 17:58:08","func_code":"def search(x, letter):\n if letter.isalpha() and type(x) == str:\n print('ok')\n else:\n print('false')","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":25544,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 17:58:49","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n time.sleep(0.1)\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33194,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 17:58:49","func_code":"def search(x, letter):\n if letter.isalpha() and type(x) == str:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":21503,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 17:59:24","func_code":"def search(x, letter):\n if letter.isalpha() and type(x) == str:\n print('True')\n else:\n print('False')\n return","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":26876,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 17:59:24","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n time.sleep(0.1)\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20978,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:01:40","func_code":"def search(x, letter):\n if letter.isalpha() and type(x) == str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":23378,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:01:40","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n time.sleep(0.1)\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17054,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:07:11","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n time.sleep(0.1)\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":16003,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:07:11","func_code":"def search(x, letter):\n if type(x) == str and letter.isalpha():\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":23223,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:13:28","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":29334,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:13:28","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n time.sleep(0.1)\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":2395,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:20:31","func_code":"def search(string, letter):\n if letter in string:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":37112,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:20:31","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n time.sleep(0.1)\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8179,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:20:31","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":30285,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:22:16","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9627,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:22:16","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":39308,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:22:16","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n time.sleep(0.1)\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":40371,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":29067,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":13617,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n time.sleep(0.1)\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38681,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n time.sleep(0.1)\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32555,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":26536,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":38395,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":27548,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":5591,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n time.sleep(0.1)\n print(num - i)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19802,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":38183,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":8262,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-27 18:31:13","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":33219,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 18:37:10","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":21142,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 18:37:10","func_code":"def countdown(num):\n if unt(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":39706,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 18:37:10","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":13081,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 18:37:49","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":20210,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 18:37:49","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26369,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 18:37:49","func_code":"def countdown(num):\n if unt(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":7679,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 18:59:49","func_code":"def countdown(num):\n i = num\n while i > 1:\n print(i)\n i = i - 1\n return i","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23400,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 19:00:13","func_code":"def countdown(num):\n i = num\n while i > 1:\n print(i)\n i = i - 1\n return i","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":40421,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 19:04:36","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21878,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 19:05:27","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":2249,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":15189,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":17221,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":26131,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30719,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":21850,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":23215,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":25877,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 19:09:25","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28739,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":4803,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":34083,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":12459,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":36782,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20138,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":38715,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11736,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:17:14","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":41295,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:18:20","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16655,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:18:20","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":111,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:18:20","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":5052,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:18:20","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32487,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:22:59","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":14578,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:22:59","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":40727,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:22:59","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21057,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:22:59","func_code":"def index(str, letter):\n if pos == len(str):\n return 0\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":41448,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:25","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":1958,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:25","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":35067,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:25","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return 0\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":8321,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:25","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23936,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":41035,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":32172,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":4637,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":13931,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":26361,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":22955,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":4381,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22924,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23540,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19574,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":37126,"user":"8ed5ee6f-d6e7-4caf-8917-36bbe373ffac","date":"2017-03-27 19:23:44","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":1192,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":10832,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":37695,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":2598,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":14843,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26168,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":30801,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":38416,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17160,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":5933,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39694,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":27877,"user":"41abe035-c2cd-41c3-ba39-497868b0334d","date":"2017-03-27 19:42:23","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":34888,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:03:37","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31099,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:03:37","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":28318,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:09:32","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21066,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:09:32","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":35579,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:09:32","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":37666,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:10:28","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":2301,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:10:28","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":2726,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:10:28","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23485,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:07","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return True\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":38774,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:07","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":41787,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:07","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":30438,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:07","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28535,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:25","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11993,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:25","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":21641,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:25","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16574,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:20:25","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return True\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":38484,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:02","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23499,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:02","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":24141,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:02","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":14317,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:02","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":32290,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:22:36","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17945,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:22:36","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":15319,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:22:36","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":2743,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:22:36","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i < n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i = i + 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":8412,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3480,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":1790,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3451,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":38610,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":17157,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":28303,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def countdown(num):\n if num > 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n countdown(num)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":7365,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":31418,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":12745,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":3470,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9711,"user":"89186303-b7a8-4f4c-9627-06ba24e03bbb","date":"2017-03-27 21:22:53","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":37288,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:23:41","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":42299,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:23:41","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":24390,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:23:41","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i = i + 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":12510,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:23:41","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23425,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36605,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":42196,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":26652,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35880,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":32851,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":8353,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":13003,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":7423,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":14568,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":363,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":25095,"user":"46432289-e1c4-49da-8392-8dfa0d08a950","date":"2017-03-27 21:24:37","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":597,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:26:52","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":30676,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:26:52","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":28482,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:26:52","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19423,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:26:52","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i = i + 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":2161,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:27:54","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":30889,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:27:54","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i = i + 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":41572,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:27:54","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35988,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:27:54","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":12199,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:36:39","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":18357,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:36:39","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29788,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:36:39","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":15394,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:36:39","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":29106,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i = i + 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39369,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":39524,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":31172,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15464,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":9081,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def fibonacci(n):\n if n == 0:\n return '0'\n elif n == 1:\n return '1'\n else:\n n1 = 1\n n2 = 0\n i = 2\n while i <= n:\n sum1 = n1 + n2\n n2 = n1\n n1 = sum1\n i = i + 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":14336,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23379,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:40:57","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n i = i + 1\n if letter in str:\n return i\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":2538,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33564,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":14480,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":22866,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def countdown(num):\n i = num\n while i >= 1:\n print(i)\n time.sleep(0.1)\n i = i - 1\n print('LIFT OFF!')\n return i","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23644,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":5028,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":3656,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":21911,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":21796,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":10213,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":17156,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def search(str, letter):\n if letter in str:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":40865,"user":"80965c2d-45d9-440d-b3c3-403c112145e9","date":"2017-03-27 21:41:04","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":3365,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":34465,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12318,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":4145,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":6349,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17996,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":38777,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":41079,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:42:15","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":36952,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":17427,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":9551,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":25578,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":11027,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":20864,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":25391,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23488,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":8801,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":25082,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3182,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":1798,"user":"01bd5698-d7fa-47db-8dec-ca4be1284feb","date":"2017-03-27 21:46:31","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":28666,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:17","func_code":"def search(str, letter):\n if len(str) == 0:\n return 'False'\n elif str[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":38034,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:17","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22356,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:17","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":34329,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:17","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":17130,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20248,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":25395,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":26638,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def search(str, letter):\n if len(str) == 0:\n return 'False'\n elif str[0] == letter:\n return 'True'\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":23747,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":12580,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":2583,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def search(str, letter):\n if len(str) == 0:\n return 'False'\n elif str[0] == letter:\n return 'True'\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":18828,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":3244,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def search(str, letter):\n if len(str) == 0:\n return 'False'\n elif str[0] == letter:\n return 'True'\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":8596,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23275,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":21120,"user":"ead2ade9-6c50-44a4-98f3-1d781d45a0f5","date":"2017-03-27 21:48:38","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":21213,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:28","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":22091,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:28","func_code":"def search(str, letter):\n for item in str:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":35373,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:28","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(1)\n countdown(int(a) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":25375,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:28","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":39358,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:45","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":1196,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:45","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":5231,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:45","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34667,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:50:45","func_code":"def search(str, letter):\n for item in str:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":8554,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:06","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":33317,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:06","func_code":"def search(str, letter):\n for item in str:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":13808,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:06","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":36914,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:06","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":38029,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":40119,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":39272,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33724,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":12618,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":3492,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":14918,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":24860,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":26488,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":5508,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":5015,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20089,"user":"08b41ad4-ecde-43b9-b629-6ff77ac435fc","date":"2017-03-27 21:51:53","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15579,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:01:18","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":30851,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:02:56","func_code":"def search(str, letter):\n if letter in str:\n print('True')\n else:\n print('False')","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":4003,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:02:56","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":153,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:03:24","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12299,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:03:24","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":25300,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:05:42","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":6826,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:05:42","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return index(str, letter, i - 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":20562,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:05:42","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":36662,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:05:42","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num - 1))","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31305,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:01","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num - 1))","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22079,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:01","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":8669,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:01","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return index(str, letter, -1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":16209,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:01","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":37711,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:54","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10953,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:54","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29723,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:54","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return index(str, letter, i - 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":21654,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:06:54","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9679,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:07:36","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":776,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:07:36","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23787,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:07:36","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return index(str, letter, -1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":15064,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:07:36","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":4939,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:10:20","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return index(str, letter, -1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":13834,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:10:20","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6867,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:10:20","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":10856,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:14:45","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":13335,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:14:45","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i += 1\n return index(str, letter, -1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":34443,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:14:45","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12864,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:14:45","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":35204,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:17:57","func_code":"def countdown(number):\n while number >= 1:\n time.sleep(0.1)\n print(number)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":7147,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:18:37","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22277,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:18:37","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":7474,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:18:37","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":4140,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:18:56","func_code":"def countdown(num):\n while number >= 1:\n time.sleep(0.1)\n print(number)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":23112,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:19:27","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(number)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":24538,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:20:06","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28210,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:20:18","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10451,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:20:18","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23116,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:20:18","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n i += 1\n elif str[pos] == letter:\n return pos\n else:\n return inddex(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":13194,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:20:18","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":27087,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:20:24","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":16190,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26882,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":14154,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16951,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6205,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n i += 1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":42169,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n i += 1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":33406,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":4137,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def search(str, letter):\n for n in str:\n if n == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":31177,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":30118,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":16841,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20720,"user":"2bcea2a1-925b-4db5-8403-2d8af9d0bb46","date":"2017-03-27 23:21:24","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n i += 1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":28045,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:27:19","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29834,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:27:19","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n print('True')\n i = i + 1\n print('False')","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":4589,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:28:10","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i = i + 1\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":4946,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:28:10","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":42435,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:30:02","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":38595,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:30:02","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i = i + 1\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":15500,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:30:02","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":1727,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:31:33","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":37486,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:31:33","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":24323,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:31:33","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i = i + 1\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":42139,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i = i + 1\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":36738,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":23914,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i = i + 1\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":32762,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":10069,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":24925,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11618,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i = i + 1\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":27238,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":2186,"user":"8b835803-8982-477e-b017-9d6fc24a47d0","date":"2017-03-27 23:32:12","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i = i + 1\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":32064,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:38:40","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":5277,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:38:40","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":3335,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:38:40","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n while fib[n]:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":28766,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:38:40","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34503,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:42:52","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":40308,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:42:52","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n while fib[n]:\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":8106,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:42:52","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":36300,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:42:52","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":15884,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:22","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":1569,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:22","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":32951,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:22","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = 0\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7768,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:22","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":4330,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":33707,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7019,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":5903,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":27961,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22793,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":10147,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":29222,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:45:45","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":27946,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":27357,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39806,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":8458,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":27195,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":27063,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":8248,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":32605,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def index(str, letter):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":8088,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39036,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":20235,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":1513,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-27 23:51:36","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":42215,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:05:03","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12871,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:05:03","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":37490,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:05:03","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":16836,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:05:03","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":4270,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:08:13","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":17060,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:08:13","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":11393,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:08:13","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":41817,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:08:13","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')\n countdown()","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":31381,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:09:50","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":4567,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:09:50","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":29639,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:09:50","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')\n countdown(num)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10737,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:09:50","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":11169,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:11:33","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12034,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:11:33","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":19209,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:11:33","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":14328,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:11:33","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":30725,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:15:22","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":29212,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:15:22","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10257,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:15:22","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":41998,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:15:22","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')\n countdown(num)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":2462,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22324,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":2746,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":41302,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":6176,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19748,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":30336,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def search(str, letter):\n if letter in str:\n return 'True'\n else:\n return 'False'\n search()","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":1217,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def countdown(num):\n import time\n i = 0\n while i < num:\n print(num - i)\n time.sleep(0.1)\n i = i + 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":18206,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":38251,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def fibonacci(n):\n fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n if n == 0:\n num = fib[0]\n elif n == 1:\n num = fib[1]\n else:\n num = fib[n - 1] + fib[n - 2]\n return num\n fibonacci()","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":12395,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":28822,"user":"2b978ca4-e1a6-4660-9bf9-39da09a92282","date":"2017-03-28 00:17:14","func_code":"def index(str, letter, num):\n if letter in str:\n pos = str.index(letter)\n return pos\n else:\n return '-1'\n index()","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":6871,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":492,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i += 1\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":32171,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36577,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def index(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return i\n i += 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":5997,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":30522,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def countdown(num):\n while num >= 1:\n time.sleep(0.1)\n print(num)\n num = num - 1\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":10945,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def search(string, letter):\n i = 0\n while i < len(string):\n if letter == string[i]:\n return 'True'\n i += 1\n return 'False'","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":4393,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:44:20","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":8311,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19196,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":1597,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":36099,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":14012,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":20263,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":19470,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":16352,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def search(string, letter):\n if len(string) == 0:\n return 'False'\n elif string[0] == letter:\n return 'True'\n else:\n return search(string[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":21952,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def countdown(num):\n if num == 0:\n time.sleep(0.1)\n print('LIFT OFF!')\n else:\n time.sleep(0.1)\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":1669,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":30563,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def index(string, letter, position):\n if position == len(string):\n return -1\n elif string[position] == letter:\n return position\n else:\n return index(string, letter, position + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":25893,"user":"106d34e0-d03c-42ab-a67a-b88759ff6307","date":"2017-03-28 01:45:07","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":41358,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":35481,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":491,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":6518,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":12509,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":17069,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":37764,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22009,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:09:26","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":20531,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7107,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def index(str, letter, x):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":26688,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":18512,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":36707,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":31795,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":10816,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":29363,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def fibonacci(n):\n i = 1\n z = 0\n x = 0\n if n > 0:\n while i < n:\n x = i\n i = i + z\n z = x\n return i\n else:\n return 0","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":27103,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def index(str, letter, x):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":23817,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38804,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12749,"user":"7c96bda5-98ec-4cff-a3e4-0118a7fafe5d","date":"2017-03-28 04:10:28","func_code":"def index(str, letter, x):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":32022,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:00:54","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":551,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:00:54","func_code":"def countdown(num):\n import datetime\n while num != 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":9409,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:03:21","func_code":"def countdown(num):\n import time\n while num != 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":15667,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:03:21","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":16648,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:10:34","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n else:\n i = i + 1\n if i == len(str) and str[i] != letter:\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":5197,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:10:34","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":1020,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:10:34","func_code":"def countdown(num):\n import time\n while num != 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34886,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n else:\n i = i + 1\n if i == len(str):\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":10062,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n else:\n i = i + 1\n if i == len(str):\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":15399,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def countdown(num):\n import time\n while num != 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8989,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":25420,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def countdown(num):\n import time\n while num != 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26778,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":341,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":34279,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n else:\n i = i + 1\n if i == len(str):\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":360,"user":"0b0c54f1-c900-465f-a33a-5c22b0497dc4","date":"2017-03-28 08:11:16","func_code":"def countdown(num):\n import time\n while num != 0:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":14091,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3969,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":32962,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":12966,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":23846,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":14424,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":17522,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":19037,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":20459,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":4068,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":15564,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def countdown(num):\n if int(num) == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(int(num) - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":16508,"user":"e61abe18-8ddf-4e11-ab3b-38a68f156ea0","date":"2017-03-28 08:40:32","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26614,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:17:34","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":22889,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:22:43","func_code":"def countdown(num):\n time.sleep(0.1)\n if num > 0:\n print(num)\n countdown(num - 1)\n time.sleep(0.1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":18578,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:22:43","func_code":"def index(steve, letter):\n return steve.find(letter)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":40063,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:22:43","func_code":"def fibonacci(n):\n l = []\n if n <= 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":19808,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:22:43","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":32160,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:24:22","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":40004,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:24:22","func_code":"def search(s, letter, pos):\n if pos == len(s):\n print('False')\n elif s[pos] == letter:\n print('True')\n else:\n return search(s, letter, pos + 1)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":35774,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:29:31","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":11828,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:29:31","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":12731,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def fibonacci(n):\n l = []\n if n <= 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":8152,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def countdown(num):\n time.sleep(0.1)\n if num > 0:\n print(num)\n countdown(num - 1)\n time.sleep(0.1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":29691,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def countdown(num):\n time.sleep(0.1)\n if num > 0:\n print(num)\n countdown(num - 1)\n time.sleep(0.1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6773,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def index(steve, letter, n):\n if letter != steve[n]:\n index(steve, letter, n + 1)\n else:\n return n","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":2111,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def fibonacci(n):\n l = []\n if n <= 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":33236,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":18638,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def fibonacci(n):\n l = []\n if n <= 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":26066,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def countdown(num):\n time.sleep(0.1)\n if num > 0:\n print(num)\n countdown(num - 1)\n time.sleep(0.1)\n else:\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20293,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":34920,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def index(steve, letter, n):\n if letter != steve[n]:\n index(steve, letter, n + 1)\n else:\n return n","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":28349,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def index(steve, letter, n):\n if letter != steve[n]:\n index(steve, letter, n + 1)\n else:\n return n","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":11279,"user":"0cf3795f-3d4f-4c32-b52b-4a8e4a33e09a","date":"2017-03-28 09:30:24","func_code":"def search(steve, letter):\n if letter in steve:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":34000,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:34:41","func_code":"def search(s, letter, pos):\n if pos == len(s):\n print('-1')\n elif s[pos] == letter:\n print(pos)\n else:\n return search(s, letter, pos + 1)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":34958,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:34:41","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":13353,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:35:20","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6569,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:35:20","func_code":"def search(s, letter, pos):\n if pos == len(s):\n print('-1')\n elif s[pos] == letter:\n return pos\n else:\n return search(s, letter, pos + 1)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":10961,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:36:39","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8338,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:36:39","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":17227,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:36:39","func_code":"def index(s, letter, pos):\n if pos == len(s):\n print('-1')\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":24403,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:37:21","func_code":"def index(s, letter, pos):\n if pos == len(s):\n return '-1'\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":36117,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:37:21","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":918,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:37:21","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":39092,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:42:24","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":1273,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:42:24","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":2473,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:42:24","func_code":"def index(s, letter, pos):\n if pos == len(s):\n return '-1'\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":40665,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:42:24","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8569,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:48:14","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":3200,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:48:14","func_code":"def index(s, letter, pos):\n if pos == len(s):\n return '-1'\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":20626,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:48:14","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n sum1 = a + b\n a = b\n b = sum1\n i += 1\n return sum1","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":9461,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:48:14","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":18523,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":30218,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":20011,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def index(s, letter, pos):\n if pos == len(s):\n return '-1'\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":41888,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":15259,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def index(s, letter, pos):\n if pos == len(s):\n return '-1'\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":20873,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":9175,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6667,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":4344,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37549,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def index(s, letter, pos):\n if pos == len(s):\n return '-1'\n elif s[pos] == letter:\n return pos\n else:\n return index(s, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":21637,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":38594,"user":"44c97823-e1ac-4434-b296-79fbeb51fa5a","date":"2017-03-28 09:55:03","func_code":"def search(s, letter):\n if len(s) == 0:\n return 'False'\n elif s[0] == letter:\n return 'True'\n else:\n return search(s[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":33519,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:41:41","func_code":"def count_letters(s):\n if not s:\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":6653,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:41:41","func_code":"def count_letters(s):\n if not s:\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":12381,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:41:54","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23185,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:41:54","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":30894,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:42:05","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n tail_max = maximum(l[1:])\n return l[0] if l[0] > tail_max else tail_max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":12571,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:42:05","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n tail_max = maximum(l[1:])\n return l[0] if l[0] > tail_max else tail_max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":35289,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 21:42:14","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":29802,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:25:24","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":20232,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:25:24","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":27068,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:25:34","func_code":"def power(m, n):\n if not n:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":27604,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:25:34","func_code":"def power(m, n):\n if not n:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":30650,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:25:47","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":41848,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:25:47","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":6503,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:26:02","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":18484,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:26:02","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":14034,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:26:23","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n min_index = i\n j = i + 1\n while j < len(A):\n if A[j] < A[min_index]:\n min_index = j\n j += 1\n A[i], A[min_index] = A[min_index], A[i]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":35403,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:26:23","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n min_index = i\n j = i + 1\n while j < len(A):\n if A[j] < A[min_index]:\n min_index = j\n j += 1\n A[i], A[min_index] = A[min_index], A[i]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":20059,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-03-29 22:26:23","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n min_index = i\n j = i + 1\n while j < len(A):\n if A[j] < A[min_index]:\n min_index = j\n j += 1\n A[i], A[min_index] = A[min_index], A[i]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":21061,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-31 18:10:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n return r1 + r2 > distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":9576,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-03-31 18:10:51","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n x = (x2 - x1) ** 2\n y = (y2 - y1) ** 2\n distance = sqrt(x + y)\n return r1 + r2 > distance","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":24827,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":11365,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if str[i] == letter:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":5676,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":7322,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":18205,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":14191,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":13599,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3076,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:28:27","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":11809,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":34322,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":4786,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":42436,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26601,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":36181,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def fibonacci(n):\n a = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n return a[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":24861,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def countdown(num):\n if num == 1:\n print(num)\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":26899,"user":"662f087e-9c5b-47c6-8644-ba7525600aac","date":"2017-04-01 16:29:59","func_code":"def search(str, letter):\n for item in str:\n if item == letter:\n return True\n return False","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":8021,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":6864,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":32298,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n fibN_2 = 0\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":2745,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n fibN_2 = 0\n fibN_1 = 1\n i = 2\n while i <= n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":21492,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def search(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":26693,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":18096,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def index(str, letter):\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":true} +{"submission_id":9822,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:08","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":13054,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":8985,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":21306,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":39831,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":41444,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":34417,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":28819,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":27185,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":33397,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":25895,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":14814,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":16929,"user":"1bdd9f47-4a26-4f0c-ae56-413531e3f59b","date":"2017-04-04 10:53:21","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":9444,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:06:03","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":12495,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:08:24","func_code":"def append2list(l1):\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":41652,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:09:50","func_code":"def append2list(l1, l2=[]):\n l3 = []\n for i in l1:\n l3.append(i)\n return l3","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":2681,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:14:43","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n l3 = l2\n l2 = []\n return l3","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":17035,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:16:36","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n l3 = []\n l3 = l2\n l2 = []\n return l3","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11653,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:19:27","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2\n l2 = []","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":15141,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:20:35","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n l3 = l2\n l2 = []\n return l3","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25960,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:23:24","func_code":"def append2list(l1, l2=[]):\n if l2 == []:\n l3 = []\n for i in l1:\n l3.append(i)\n return l3\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":36882,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:24:03","func_code":"def append2list(l1, l2=[]):\n if l2 == []:\n l3 = []\n for i in l1:\n l3.append(i)\n return l3\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":20203,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:24:49","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l3 = []\n for i in l1:\n l3.append(i)\n return l3\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40932,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:24:49","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l3 = []\n for i in l1:\n l3.append(i)\n return l3\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":16887,"user":"11236dde-1cd4-4a17-af9c-b06843cf22cc","date":"2017-04-05 22:24:49","func_code":"def append2list(l1, l2=[]):\n if l2 == None:\n l3 = []\n for i in l1:\n l3.append(i)\n return l3\n else:\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":4060,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-14 11:26:40","func_code":"def append2list(l1, l2=[]):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11453,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-14 11:26:40","func_code":"def append2list(l1, l2=[]):\n if l2:\n for i in l1:\n l2.append(i)\n return l2\n else:\n return l1","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40825,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-14 11:31:06","func_code":"_A = None\n\n\ndef overlap(x1=_A, y1=_A, r1=_A, x2=_A, y2=_A, r2=_A):\n if x1 is _A:\n x1 = 0\n if y1 is _A:\n y1 = 0\n if r1 is _A:\n r1 = 1\n if x2 is _A:\n x2 = 0\n if y2 is _A:\n y2 = 0\n if r2 is _A:\n r2 = 1","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":26771,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-16 15:59:23","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = (x2 - x1) ** 2\n b = (y2 - y1) ** 2\n c = (a + b) ** 0.5\n total_r = r1 + r2\n if c < total_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":5730,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-16 15:59:23","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = (x2 - x1) ** 2\n b = (y2 - y1) ** 2\n c = (a + b) ** 0.5\n total_r = r1 + r2\n if c < total_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":15340,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-16 15:59:23","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n a = (x2 - x1) ** 2\n b = (y2 - y1) ** 2\n c = (a + b) ** 0.5\n total_r = r1 + r2\n if c < total_r:\n return True\n else:\n return False","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":20851,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-16 18:42:45","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":24967,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-16 18:42:45","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":21838,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-16 18:50:41","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return (x1 * x2) ** 2 + (y1 * y2) ** 2 < (r1 + r2) ** 2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":false} +{"submission_id":24806,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-16 18:51:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":27785,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-16 18:51:33","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":4601,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-17 15:01:35","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":7808,"user":"b46a0d8e-c049-41aa-b896-956cda3c8d13","date":"2017-04-17 15:01:35","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":17969,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:17:40","func_code":"def power(m, n):\n if not n:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":2958,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:17:40","func_code":"def power(m, n):\n if not n:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":25667,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:18:11","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":37167,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:18:11","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":24386,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:18:31","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n tail_max = maximum(l[1:])\n return l[0] if l[0] > tail_max else tail_max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":16757,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:18:31","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n tail_max = maximum(l[1:])\n return l[0] if l[0] > tail_max else tail_max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":22301,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:18:54","func_code":"def count_letters(s):\n if not s:\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":33981,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:18:54","func_code":"def count_letters(s):\n if not s:\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":18976,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:19:17","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":16906,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:19:17","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":18694,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:19:41","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":6460,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:19:41","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":41691,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:20:02","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":6792,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:20:18","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":42440,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:20:18","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":12690,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:20:37","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n min_index = i\n j = i + 1\n while j < len(A):\n if A[j] < A[min_index]:\n min_index = j\n j += 1\n A[i], A[min_index] = A[min_index], A[i]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":28887,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:20:37","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n min_index = i\n j = i + 1\n while j < len(A):\n if A[j] < A[min_index]:\n min_index = j\n j += 1\n A[i], A[min_index] = A[min_index], A[i]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":33852,"user":"b1593687-e1b6-4969-bf98-9b229efc6797","date":"2017-04-21 09:20:37","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n min_index = i\n j = i + 1\n while j < len(A):\n if A[j] < A[min_index]:\n min_index = j\n j += 1\n A[i], A[min_index] = A[min_index], A[i]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":25560,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:11:44","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":23762,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:12:39","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":25619,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-21 11:14:52","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":32925,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-21 11:15:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":3728,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:16:00","func_code":"def minimum(l):\n return l.sort()[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":2171,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:16:45","func_code":"def power(n):\n if n == 0:\n return 0\n else:\n return n ** power(n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":26047,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:17:25","func_code":"def power(m, n):\n if n == 0:\n return 0\n else:\n return m ** power(n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":29316,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-21 11:18:49","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":13887,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:20:07","func_code":"def power(m, n):\n if n == 0:\n return 0\n else:\n return n ** power(m - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":30492,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:20:21","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":10087,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:20:21","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":39371,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:20:22","func_code":"def minimum(l):\n return l.sort()[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":27678,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:21:05","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":3812,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:21:05","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":33872,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:21:50","func_code":"def power(a, b):\n return a ** b","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":13863,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:21:51","func_code":"def minimum(l):\n l = l.sort()\n return l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":40678,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 11:23:21","func_code":"def power(m, n):\n if n == 0:\n return 1\n if n == 1:\n return m\n if m == 0:\n return 0\n if m == 1:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":38602,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 11:23:21","func_code":"def power(m, n):\n if n == 0:\n return 1\n if n == 1:\n return m\n if m == 0:\n return 0\n if m == 1:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":193,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:24:33","func_code":"def minimum(l):\n l.sort()\n return l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":26437,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:24:33","func_code":"def minimum(l):\n l.sort()\n return l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":35874,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:24:35","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":2964,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:24:35","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":26768,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:25:08","func_code":"def minimum(l):\n A = 'null'\n lowest = A\n for c in l:\n if lowest == A:\n lowest = c\n elif c < lowest:\n lowest = c\n return lowest","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":13731,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:25:08","func_code":"def minimum(l):\n A = 'null'\n lowest = A\n for c in l:\n if lowest == A:\n lowest = c\n elif c < lowest:\n lowest = c\n return lowest","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":1736,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:25:16","func_code":"def power(m, n):\n if n == 0:\n return 1\n if n == 1:\n return m\n if m == 0:\n return 0\n if m == 1:\n return 1\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":21446,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:25:24","func_code":"def maximum(l):\n return l.sort()\n l[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":41261,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:25:48","func_code":"def maximum(l):\n l.sort()\n return l[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":21689,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:25:48","func_code":"def maximum(l):\n l.sort()\n return l[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":15763,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:25:53","func_code":"def maximum(l):\n A = 'null'\n highest = A\n for c in l:\n if maximum == A:\n maximum = c\n elif c > maximum:\n maximum = c\n return maximum","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":7094,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:27:10","func_code":"def power(m, n):\n if m == 0:\n return 0\n elif m == 1:\n return 1\n elif n == 0:\n return 1\n elif n == 1:\n return m\n else:\n m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":38717,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:27:11","func_code":"def maximum(l):\n A = 'null'\n highest = A\n for c in l:\n if highest == A:\n highest = c\n elif c > highest:\n highest = c\n return highest","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":37701,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:27:11","func_code":"def maximum(l):\n A = 'null'\n highest = A\n for c in l:\n if highest == A:\n highest = c\n elif c > highest:\n highest = c\n return highest","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":23807,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:27:30","func_code":"def power(m, n):\n if m == 0:\n return 0\n elif m == 1:\n return 1\n elif n == 0:\n return 1\n elif n == 1:\n return m\n else:\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":1709,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:27:30","func_code":"def power(m, n):\n if m == 0:\n return 0\n elif m == 1:\n return 1\n elif n == 0:\n return 1\n elif n == 1:\n return m\n else:\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":36106,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:28:58","func_code":"def count_letters(s):\n str_len = 0\n for c in s:\n str_len += 1\n return str_len","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":15053,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:28:58","func_code":"def count_letters(s):\n str_len = 0\n for c in s:\n str_len += 1\n return str_len","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":24980,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:29:22","func_code":"def power(a, b):\n return a ** b","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":7813,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:29:22","func_code":"def power(a, b):\n return a ** b","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":5923,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:29:29","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n mini = minimum(l[1:])\n if l[0] < mini:\n return l[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":42205,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:29:29","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n mini = minimum(l[1:])\n if l[0] < mini:\n return l[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":21615,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:29:42","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":19138,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:29:42","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":38208,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:29:44","func_code":"def minimum(a):\n tmp = a[0]\n for i in a:\n if i < tmp:\n tmp = i\n return tmp","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":10228,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:29:44","func_code":"def minimum(a):\n tmp = a[0]\n for i in a:\n if i < tmp:\n tmp = i\n return tmp","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":13560,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:30:00","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":19392,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:30:00","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":6678,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:31:01","func_code":"def maximum(a):\n tmp = a[0]\n for i in a:\n if i > tmp:\n tmp = i\n return tmp","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":23947,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:31:01","func_code":"def maximum(a):\n tmp = a[0]\n for i in a:\n if i > tmp:\n tmp = i\n return tmp","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":11318,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-21 11:31:01","func_code":"def maximum(a):\n tmp = a[0]\n for i in a:\n if i > tmp:\n tmp = i\n return tmp","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":2931,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:31:02","func_code":"def reverse_list(l):\n new_list = []\n for c in l:\n new_list.append(l.pop)\n return new_list","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":13958,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:31:04","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n maxi = maximum(l[1:])\n if l[0] > maxi:\n return l[0]\n else:\n return maxi","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":11433,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:31:04","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n maxi = maximum(l[1:])\n if l[0] > maxi:\n return l[0]\n else:\n return maxi","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":41399,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:33:42","func_code":"def minimum(l):\n if not l or len(l) == 1:\n return l\n tail_min = minimum(l[1:])\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":23890,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:34:43","func_code":"def reverse_list(l):\n new_list = []\n for c in l:\n new_list.append(l.pop())\n return new_list","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":13750,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:35:17","func_code":"def minimum(l):\n if not l:\n return l\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n if tail_min == []:\n return l[0]\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":35608,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:35:17","func_code":"def minimum(l):\n if not l:\n return l\n if len(l) == 1:\n return l[0]\n tail_min = minimum(l[1:])\n if tail_min == []:\n return l[0]\n return l[0] if l[0] < tail_min else tail_min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":15784,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:37:10","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n mini = minimum(l[1:])\n if l[0] < mini:\n return l[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":840,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:37:10","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n mini = minimum(l[1:])\n if l[0] < mini:\n return l[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":26962,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:38:21","func_code":"def maximum(l):\n if not l:\n return l\n if len(l) == 1:\n return l[0]\n tail_max = maximum(l[1:])\n if tail_max == []:\n return l[0]\n return l[0] if l[0] > tail_max else tail_max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":2379,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:38:21","func_code":"def maximum(l):\n if not l:\n return l\n if len(l) == 1:\n return l[0]\n tail_max = maximum(l[1:])\n if tail_max == []:\n return l[0]\n return l[0] if l[0] > tail_max else tail_max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":31180,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:39:25","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n maxi = maximum(l[1:])\n if l[0] > maxi:\n return l[0]\n else:\n return maxi","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":9856,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:39:25","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n maxi = maximum(l[1:])\n if l[0] > maxi:\n return l[0]\n else:\n return maxi","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":29495,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:39:46","func_code":"def power(m, n):\n if n == 0:\n return 1\n if n == 1:\n return m\n if m == 0:\n return 0\n if m == 1:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":35300,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:39:46","func_code":"def power(m, n):\n if n == 0:\n return 1\n if n == 1:\n return m\n if m == 0:\n return 0\n if m == 1:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":3403,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:41:18","func_code":"def count_letters(string):\n if not string:\n return 0\n return count_letters(string[1:] + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":6021,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:42:00","func_code":"def reverse_list(l):\n new_list = []\n for c in l:\n new_list.append(l.pop())\n new_list.append(l.pop())\n return new_list","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":2611,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:42:04","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n elif minimum(l[0:len(l)]) < minimum(l[len(l) + 1:]):\n return minimum(l[0:len(l)])\n else:\n return minimum(l[len(l) + 1:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":7281,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:43:33","func_code":"def power(m, n):\n while n != 0:\n m *= m\n n -= 1\n return m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":36100,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:44:05","func_code":"def reverse_list(l):\n new_list = []\n i = 0\n while len(l) > i:\n new_list.append(l.pop())\n i += 1\n return new_list","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":12224,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:45:31","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n mini = minimum(l[1:])\n if l[0] < mini:\n return l[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":2067,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:45:31","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n mini = minimum(l[1:])\n if l[0] < mini:\n return l[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":288,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:45:34","func_code":"def power(m, n):\n while n != 0:\n m = m * m\n n = n - 1\n return m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":8131,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 11:46:09","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n smallest = minimum(l[1:])\n if l[0] < smallest:\n return l[0]\n else:\n return smallest","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":6123,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 11:46:09","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n smallest = minimum(l[1:])\n if l[0] < smallest:\n return l[0]\n else:\n return smallest","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":36447,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:46:12","func_code":"def power(m, n):\n while n > 0:\n m = m * m\n n = n - 1\n return m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":10403,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:46:13","func_code":"def count_letters(string):\n if not string:\n return 0\n return count_letters(string[1:]) + 1","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":30977,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:46:13","func_code":"def count_letters(string):\n if not string:\n return 0\n return count_letters(string[1:]) + 1","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":11662,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 11:46:17","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":26010,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 11:46:17","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":18456,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-21 11:46:23","func_code":"def power(m, n, flag=True, m1=None):\n if not n:\n return 1\n if flag:\n m1 = m\n if n == 1:\n return m\n return power(m * m1, n - 1, False, m1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":29722,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-21 11:46:23","func_code":"def power(m, n, flag=True, m1=None):\n if not n:\n return 1\n if flag:\n m1 = m\n if n == 1:\n return m\n return power(m * m1, n - 1, False, m1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":28347,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-21 11:46:23","func_code":"def power(m, n, flag=True, m1=None):\n if not n:\n return 1\n if flag:\n m1 = m\n if n == 1:\n return m\n return power(m * m1, n - 1, False, m1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":8495,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:46:34","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n m = maximum(l[1:])\n if l[0] > m:\n return l[0]\n else:\n return m","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":21490,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:46:34","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n m = maximum(l[1:])\n if l[0] > m:\n return l[0]\n else:\n return m","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":12001,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:47:00","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":2777,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:47:00","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":27745,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:47:02","func_code":"def power(m, n):\n while n > 0:\n m = m * m\n n = n - 1\n print(n)\n return m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":1386,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:48:11","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n smaller = minimum(l[1:])\n if l[0] < smaller:\n return l[0]\n return smaller","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":25328,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:48:11","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n smaller = minimum(l[1:])\n if l[0] < smaller:\n return l[0]\n return smaller","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":16236,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:48:15","func_code":"def count_letters(s):\n if len(s) == 1:\n return 1\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":25922,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:48:43","func_code":"def count_letters(s):\n if len(s) == 0:\n return 0\n elif len(s) == 1:\n return 1\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":37003,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:48:43","func_code":"def count_letters(s):\n if len(s) == 0:\n return 0\n elif len(s) == 1:\n return 1\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":29059,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:49:48","func_code":"def reverse_list(l):\n return l[-1] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":21049,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:50:13","func_code":"def reverse_list(l):\n if len(l) == 1:\n return l\n return l[-1] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":26414,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:50:39","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n smaller = maximum(l[1:])\n if l[0] > smaller:\n return l[0]\n return smaller","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":4921,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:51:15","func_code":"def reverse_list(l):\n if len(l) == 1:\n return l\n return l[-1].extend(reverse_list(l[:-1]))","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":18538,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:51:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return l\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":17553,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:51:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return l\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":28964,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-21 11:51:42","func_code":"def power(m, n):\n m = m ** n\n return power(m, n)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":40886,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:51:55","func_code":"def reverse_list(l):\n if len(l) == 1:\n return l\n return [l[-1]].extend(reverse_list(l[:-1]))","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":11998,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 11:52:12","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n biggest = maximum(l[1:])\n if l[0] > biggest:\n return l[0]\n else:\n return biggest","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":6934,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 11:52:12","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n biggest = maximum(l[1:])\n if l[0] > biggest:\n return l[0]\n else:\n return biggest","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":33095,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:52:23","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n bigger = maximum(l[1:])\n if l[0] > bigger:\n return l[0]\n return bigger","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":35619,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 11:52:23","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n bigger = maximum(l[1:])\n if l[0] > bigger:\n return l[0]\n return bigger","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":23870,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:52:34","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":7501,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-21 11:52:36","func_code":"def selectionsort(a):\n return 'fuck my life and everything in between'","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":10218,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:52:40","func_code":"def reverse_list(l):\n if len(l) == 1:\n return l\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":8606,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:52:43","func_code":"def maximum(lst):\n if len(lst) == 1:\n return lst[0]\n maxi = maximum(lst[1:])\n if lst[0] > maxi:\n return lst[0]\n else:\n return maxi","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":2381,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:52:43","func_code":"def maximum(lst):\n if len(lst) == 1:\n return lst[0]\n maxi = maximum(lst[1:])\n if lst[0] > maxi:\n return lst[0]\n else:\n return maxi","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":24072,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:52:49","func_code":"def minimum(lst):\n if len(lst) == 1:\n return lst[0]\n mini = minimum(lst[1:])\n if lst[0] < mini:\n return lst[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":29204,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:52:49","func_code":"def minimum(lst):\n if len(lst) == 1:\n return lst[0]\n mini = minimum(lst[1:])\n if lst[0] < mini:\n return lst[0]\n else:\n return mini","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":21558,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:52:55","func_code":"def reverse_list(a):\n if a == []:\n return []\n temp = reverse_list(a[1:])\n temp.append(a[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":28461,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:52:55","func_code":"def reverse_list(a):\n if a == []:\n return []\n temp = reverse_list(a[1:])\n temp.append(a[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":27383,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:53:00","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":4813,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:53:00","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":39520,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:53:06","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":34373,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:53:06","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7922,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:53:29","func_code":"def reverse_list(l):\n if len(l) == 1 or not l:\n return l\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":32066,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:53:29","func_code":"def reverse_list(l):\n if len(l) == 1 or not l:\n return l\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":42297,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:54:00","func_code":"def reverse_list(ls):\n return ls.reverse()","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":20480,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:54:01","func_code":"def power(m, n):\n if n == 0:\n return 0\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":7494,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-21 11:54:30","func_code":"def selectionsort(a):\n start = time.time()\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":12434,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-21 11:54:30","func_code":"def selectionsort(a):\n start = time.time()\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":116,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-21 11:55:06","func_code":"def power(m, n):\n if m == m ** n:\n return m\n else:\n m = m ** n\n return power(m, n)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":31415,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:55:39","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23777,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 11:55:39","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":42175,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-21 11:56:00","func_code":"def power(m, n):\n if m == 1:\n return m\n else:\n m = m ** n\n return power(m, n)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":28460,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 11:56:23","func_code":"def reverse_list(l):\n if len(l) == 1:\n return l\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":5043,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:56:37","func_code":"def power(m, n):\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":31378,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 11:57:42","func_code":"def power(m, n):\n if n == 0:\n return m\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":23199,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:57:45","func_code":"def fibonacci(n):\n return n * fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":41796,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:58:00","func_code":"def reverse_list(ls):\n ls.reverse()\n return ls","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":27605,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 11:58:00","func_code":"def reverse_list(ls):\n ls.reverse()\n return ls","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":17978,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:58:38","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":41169,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 11:58:38","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33460,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:58:59","func_code":"def reverse_list(l):\n if l == []:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":7371,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 11:58:59","func_code":"def reverse_list(l):\n if l == []:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":5709,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 11:59:33","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":28874,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:00:09","func_code":"def minimum(l):\n smallest = l[0]\n for e in l:\n if e < smallest:\n smallest = e\n return smallest","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":35006,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:00:09","func_code":"def minimum(l):\n smallest = l[0]\n for e in l:\n if e < smallest:\n smallest = e\n return smallest","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":24216,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-21 12:00:30","func_code":"def power(m, n):\n if m == 0:\n return 1\n else:\n m = m ** n\n return power(m - 1, n)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":34978,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:00:32","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":16612,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:00:32","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":20343,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-21 12:01:14","func_code":"def power(m, n):\n if m == 0:\n return 1\n else:\n m = m ** n\n return n * power(m - 1, n)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":30697,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:01:33","func_code":"def maximum(l):\n biggest = l[0]\n for e in l:\n if e < biggest:\n biggest = e\n return biggest","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":13040,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:01:33","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":28113,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:01:33","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":7944,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:01:55","func_code":"def reverse_list(a):\n if a == []:\n return []\n tmp = reverse_list(a[1:])\n tmp.append(a[0])\n return tmp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":36084,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:01:55","func_code":"def reverse_list(a):\n if a == []:\n return []\n tmp = reverse_list(a[1:])\n tmp.append(a[0])\n return tmp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":35678,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:01:56","func_code":"def maximum(l):\n biggest = l[0]\n for e in l:\n if e > biggest:\n biggest = e\n return biggest","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":23182,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:01:56","func_code":"def maximum(l):\n biggest = l[0]\n for e in l:\n if e > biggest:\n biggest = e\n return biggest","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":36940,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-21 12:02:10","func_code":"def power(m, n):\n return power(m - 1, n)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":42269,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 12:03:28","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":33275,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 12:03:28","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":13498,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:03:54","func_code":"def reverse_list(l):\n if len(l) == 1:\n return l\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":25421,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:04:51","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":40486,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:04:51","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":15580,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:05:45","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":11369,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:05:45","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":875,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:06:07","func_code":"def reverse_list(l):\n if len(l) == 1:\n return list(l)\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":34016,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 12:06:16","func_code":"def count_letters(s):\n if not s:\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":10127,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 12:06:16","func_code":"def count_letters(s):\n if not s:\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":20773,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:06:43","func_code":"def reverse_list(l):\n if l == []:\n return []\n if len(l) == 1:\n return l\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":17560,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:07:15","func_code":"def reverse_list(l):\n if not l:\n return []\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":35737,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:07:25","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":36019,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:07:25","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":40223,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:07:51","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":14291,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:07:51","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":35715,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:08:23","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":10824,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:08:23","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":20082,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:08:24","func_code":"def minimum(a):\n m = a[0]\n for n in a:\n if n < m:\n n == m\n return m","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":1501,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 12:08:28","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":2190,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 12:08:28","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":18101,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:08:46","func_code":"def minimum(a):\n m = a[0]\n for n in a:\n if n < m:\n m = n\n return m","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":13630,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:08:46","func_code":"def minimum(a):\n m = a[0]\n for n in a:\n if n < m:\n m = n\n return m","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":21027,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:09:27","func_code":"def maximum(a):\n m = a[0]\n for n in a:\n if n > m:\n m = n\n return m","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":7935,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:09:27","func_code":"def maximum(a):\n m = a[0]\n for n in a:\n if n > m:\n m = n\n return m","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":4680,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:09:46","func_code":"def reverse_list(l):\n if not l:\n return l\n else:\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":37122,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:09:46","func_code":"def reverse_list(l):\n if not l:\n return l\n else:\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":26233,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:11:10","func_code":"def count_letters(s):\n i = 0\n for c in s:\n i += 1\n return i","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":31311,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:11:10","func_code":"def count_letters(s):\n i = 0\n for c in s:\n i += 1\n return i","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":33045,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 12:11:29","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":3864,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 12:11:29","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":4192,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:12:12","func_code":"def count_letters(word):\n if not word:\n return 0\n return 1 + word[:-1]","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":20633,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:12:46","func_code":"def reverse_list(a):\n b = []\n for s in a:\n b.append(-1)\n return b","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":876,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:12:54","func_code":"def count_letters(word):\n if not word:\n return 0\n return 1 + count_letters(word[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":6718,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:12:54","func_code":"def count_letters(word):\n if not word:\n return 0\n return 1 + count_letters(word[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":357,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:13:40","func_code":"def reverse_list(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[-i - 1])\n i += 1\n return b","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":11031,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 12:14:56","func_code":"def swap(l, i, j):\n temp = l[i]\n l[i] = l[j]\n l[j] = temp\n\n\ndef quicksort(l, p, r):\n if r <= p:\n return l\n q = p\n for j in range(p, r):\n if l[j] <= l[r]:\n swap(l, j, q)\n q += 1\n swap(l, q, r)\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)\n return l","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":36103,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 12:14:56","func_code":"def swap(l, i, j):\n temp = l[i]\n l[i] = l[j]\n l[j] = temp\n\n\ndef quicksort(l, p, r):\n if r <= p:\n return l\n q = p\n for j in range(p, r):\n if l[j] <= l[r]:\n swap(l, j, q)\n q += 1\n swap(l, q, r)\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)\n return l","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":1940,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:15:32","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return A\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":21608,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:15:32","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return A\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":13323,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:15:50","func_code":"def fibonacci(n):\n a = 0\n b = 1\n while a < n:\n a += b\n a, b = b, a\n print(a)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26783,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:16:21","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":37574,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:16:21","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":12527,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:17:50","func_code":"def fibonacci(n):\n a = 0\n b = 1\n l = []\n while a < n:\n a += b\n a, b = b, a\n l.append(a)\n return l(len.l() - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":16794,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:18:34","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":21564,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:18:34","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":35590,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:18:46","func_code":"def partition(l, p, r):\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n return q\n\n\ndef quicksort(l, p, r):\n if r <= p:\n return l\n q = partition(l, p, r)\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":33325,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:18:46","func_code":"def partition(l, p, r):\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n return q\n\n\ndef quicksort(l, p, r):\n if r <= p:\n return l\n q = partition(l, p, r)\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":7496,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:20:37","func_code":"def reverse_list(l):\n if not l:\n return []\n return reverse_list[0].append(reverse_list[1:])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":21463,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:20:57","func_code":"def reverse_list(l):\n if not l:\n return []\n return reverse_list[0].append(reverse_list(l[1:]))","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":24090,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:21:18","func_code":"def reverse_list(l):\n if not l:\n return []\n return l[0].append(reverse_list(l[1:]))","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":13552,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:21:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":12806,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:21:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":20136,"user":"b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d","date":"2017-04-21 12:21:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":27710,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:21:44","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":10550,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:21:44","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":805,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:21:58","func_code":"def reverse_list(l):\n if not l:\n return []\n return [l[0]].append(reverse_list(l[1:]))","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":20523,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:21:58","func_code":"def fibonacci(n):\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[int(len(l) - 1)]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7763,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:23:00","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":27470,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:23:13","func_code":"def reverse_list(l):\n if not l:\n return []\n return [l[0]].append(reverse_list(l[1:]))","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":26061,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:23:26","func_code":"def reverse_list(a):\n if a == []:\n return a\n else:\n return reverse_list(a[1:]).append(a[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":4855,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-21 12:24:14","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":31548,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-21 12:24:14","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":34094,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-21 12:24:14","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":33000,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:24:34","func_code":"def reverse_list(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[-i - 1])\n i += 1\n return b","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":11002,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:24:34","func_code":"def reverse_list(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[-i - 1])\n i += 1\n return b","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":27219,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:25:22","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":33997,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:25:22","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":19481,"user":"72de96bc-40bc-48ca-b1c3-91150748b31a","date":"2017-04-21 12:25:22","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":28437,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:25:30","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":5021,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:25:30","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":25278,"user":"0473ca8a-3862-4046-a34c-16eb754fdfff","date":"2017-04-21 12:25:30","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":9504,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:25:53","func_code":"def fibonacci(n):\n try:\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[int(len(l) - 1)]\n except:\n return 1","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":40955,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 12:26:12","func_code":"def selectionsort(l):\n N = len(l)\n p = 0\n j = 1\n while j < N:\n if l[j] < l[p]:\n p = j\n j += 1\n return p","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":7872,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 12:26:12","func_code":"def selectionsort(l):\n N = len(l)\n p = 0\n j = 1\n while j < N:\n if l[j] < l[p]:\n p = j\n j += 1\n return p","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":27855,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-21 12:26:12","func_code":"def selectionsort(l):\n N = len(l)\n p = 0\n j = 1\n while j < N:\n if l[j] < l[p]:\n p = j\n j += 1\n return p","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":25716,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:26:39","func_code":"def reverse_list(l):\n if not l:\n return []\n return [l[0]].append(reverse_list(l[1:]))","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":6742,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:28:14","func_code":"def selectionsort(l):\n i = 0\n while i < len(l):\n p = i\n j = i + 1\n while j < len(l):\n if l[j] < l[p]:\n p = j\n j = j + 1\n tmp = l[p]\n l[p] = l[i]\n l[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":41318,"user":"9550e418-a019-49c2-a2e9-8322a300fb6f","date":"2017-04-21 12:28:14","func_code":"def selectionsort(l):\n i = 0\n while i < len(l):\n p = i\n j = i + 1\n while j < len(l):\n if l[j] < l[p]:\n p = j\n j = j + 1\n tmp = l[p]\n l[p] = l[i]\n l[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":36236,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:28:57","func_code":"def fibonacci(n):\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[-1]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":8584,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:29:04","func_code":"def reverse_list(l):\n if not l or len(l) == 1:\n return l\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":11135,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:29:04","func_code":"def reverse_list(l):\n if not l or len(l) == 1:\n return l\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":40598,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 12:30:06","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":22377,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 12:30:06","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":26319,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 12:34:33","func_code":"def power(n, m):\n return n ** m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":17954,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 12:34:33","func_code":"def power(n, m):\n return n ** m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":24651,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:37:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return ()\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":25097,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:37:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return ()\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":25088,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:38:42","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n print(l)\n return l[-1]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":8858,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:38:54","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[-1]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":35680,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:40:22","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[-1]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":5427,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:40:22","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[-1]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":34733,"user":"1c2a27a6-b2a2-47c9-b19f-39d39288a873","date":"2017-04-21 12:40:22","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n a = 0\n b = 1\n l = []\n c = 0\n while c != n:\n a += b\n a, b = b, a\n l.append(a)\n c += 1\n return l[-1]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23507,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 12:42:01","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":13289,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 12:42:01","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":35654,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 12:46:23","func_code":"def minimum(n=[]):\n List = sorted(n)\n return List[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":16810,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 12:46:23","func_code":"def minimum(n=[]):\n List = sorted(n)\n return List[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":16001,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 12:47:33","func_code":"def maximum(n=[]):\n List = sorted(n)\n return List[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":2060,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 12:47:33","func_code":"def maximum(n=[]):\n List = sorted(n)\n return List[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":9505,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 12:47:45","func_code":"def power(x, y):\n return x ** y","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":21135,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 12:47:45","func_code":"def power(x, y):\n return x ** y","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":2201,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:48:27","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":8986,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:49:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":16457,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:49:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":883,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:49:57","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":23382,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:49:57","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":36347,"user":"3bcffc16-908f-42c5-9ac3-f685ae6eca33","date":"2017-04-21 12:49:57","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":24004,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 12:50:02","func_code":"def selectionsort(l):\n for i in range(1, len(l)):\n for j in range(i, 0, -1):\n if l[j] < l[j - 1]:\n temp = l[j]\n l[j] = l[j - 1]\n l[j - 1] = temp","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":27701,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 12:50:02","func_code":"def selectionsort(l):\n for i in range(1, len(l)):\n for j in range(i, 0, -1):\n if l[j] < l[j - 1]:\n temp = l[j]\n l[j] = l[j - 1]\n l[j - 1] = temp","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":28784,"user":"932dfe81-cd49-4d41-8b87-456f3246e781","date":"2017-04-21 12:50:02","func_code":"def selectionsort(l):\n for i in range(1, len(l)):\n for j in range(i, 0, -1):\n if l[j] < l[j - 1]:\n temp = l[j]\n l[j] = l[j - 1]\n l[j - 1] = temp","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":27649,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:52:10","func_code":"def fibonacci(n):\n if n < 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":21266,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:52:10","func_code":"def fibonacci(n):\n if n < 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":35793,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-21 12:52:10","func_code":"def fibonacci(n):\n if n < 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":313,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 13:00:43","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fib(n - 1) + fib(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":17012,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 13:01:19","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":30472,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 13:01:49","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":13478,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 13:01:49","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":31033,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-21 13:01:49","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7341,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:03:26","func_code":"def minimum(l):\n min = sum(l)\n for i in l:\n if i < min:\n min = i\n return min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":26663,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:03:26","func_code":"def minimum(l):\n min = sum(l)\n for i in l:\n if i < min:\n min = i\n return min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":10884,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:04:43","func_code":"def maximum(l):\n max = -1 * sum(l)\n for i in l:\n if i > max:\n max = i\n return max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":15440,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:04:43","func_code":"def maximum(l):\n max = -1 * sum(l)\n for i in l:\n if i > max:\n max = i\n return max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":21031,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:05:52","func_code":"def count_letters(s):\n count = 0\n for i in s:\n count += 1\n return count","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":28664,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:05:52","func_code":"def count_letters(s):\n count = 0\n for i in s:\n count += 1\n return count","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":12660,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:06:32","func_code":"def reverse_list(l):\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":17421,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:06:32","func_code":"def reverse_list(l):\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":29518,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:08:45","func_code":"def fibonacci(n):\n fibonacci = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]\n return fibonacci[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":34986,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:08:45","func_code":"def fibonacci(n):\n fibonacci = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]\n return fibonacci[n]","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26356,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 13:20:05","func_code":"def selectionsort(a):\n if len(a) != 2:\n a = [[], a]\n mini = min(a[1])\n a[1].remove(mini)\n a[0].append(mini)\n if len(a[1]) == 0:\n return a[0]\n else:\n return selectionsort(a)","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":42177,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 13:20:34","func_code":"def smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selectionsort(a):\n i = 0\n while i < len(a):\n p = smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":7716,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 13:20:34","func_code":"def smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selectionsort(a):\n i = 0\n while i < len(a):\n p = smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":2555,"user":"98d44d17-92f8-4274-915e-b88bdd9dca26","date":"2017-04-21 13:20:34","func_code":"def smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n return p\n\n\ndef swap(a, i, p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n\n\ndef selectionsort(a):\n i = 0\n while i < len(a):\n p = smallest(a, i)\n swap(a, i, p)\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":37454,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:21:48","func_code":"def quicksort(a, n, b):\n a = sorted(a)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":1410,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:21:48","func_code":"def quicksort(a, n, b):\n a = sorted(a)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":41927,"user":"9e18f731-fa38-496b-927b-db0cd1aa3409","date":"2017-04-21 13:21:48","func_code":"def quicksort(a, n, b):\n a = sorted(a)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":28074,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 15:38:24","func_code":"def selectionsort(A):\n for i in range(len(A)):\n mini = i\n for j in range(i, len(A)):\n if A[j] < A[mini]:\n mini = j\n A[i], A[mini] = A[mini], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":16941,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-04-21 15:38:24","func_code":"def selectionsort(A):\n for i in range(len(A)):\n mini = i\n for j in range(i, len(A)):\n if A[j] < A[mini]:\n mini = j\n A[i], A[mini] = A[mini], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":18363,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:10:47","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":24482,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:10:47","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":2438,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:15:00","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":27875,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:15:00","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":34333,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:18:14","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[1])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":27115,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:19:00","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":37184,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:19:00","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":19598,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:22:21","func_code":"def count_letters(word):\n total = 0\n for c in word:\n total += 1\n return total","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":41636,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:22:21","func_code":"def count_letters(word):\n total = 0\n for c in word:\n total += 1\n return total","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":40362,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:26:58","func_code":"def reverse_list(l):\n new = []\n i = 0\n while i < len(l):\n new.append(l[len(l) - i - 1])\n i += 1\n return new","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":6320,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:27:21","func_code":"def reverse_list(l):\n new = []\n i = 0\n while i < len(l):\n new.append(l[len(l) - i - 1])\n i += 1\n return new","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":31684,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:27:21","func_code":"def reverse_list(l):\n new = []\n i = 0\n while i < len(l):\n new.append(l[len(l) - i - 1])\n i += 1\n return new","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":41316,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:31:09","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":71,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:31:09","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":19317,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:48:09","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":41357,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:48:09","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":19717,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-21 16:48:09","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":20500,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:35:44","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":40303,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:35:44","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":20067,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:36:15","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":8719,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:36:15","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":9035,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:38:18","func_code":"def power(n, p):\n if p == 0:\n return 1\n else:\n return power(n, p - 1) * n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":26312,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:38:18","func_code":"def power(n, p):\n if p == 0:\n return 1\n else:\n return power(n, p - 1) * n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":26728,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:39:34","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":41275,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:39:34","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":853,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:39:59","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":2671,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:39:59","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":20578,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:40:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":37138,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:40:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":15146,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:40:55","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":38116,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:40:55","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":33027,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:41:42","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":17925,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:41:42","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":28294,"user":"7b251fef-3898-4dec-aa70-18b4a70042a3","date":"2017-04-21 18:41:42","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":18022,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-21 19:08:21","func_code":"def power(m, n):\n if n == 0:\n return 0\n return n ** m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":13255,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-21 19:08:57","func_code":"def power(m, n):\n if n == 0:\n return 0\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":19238,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-21 19:09:20","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":28399,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-21 19:09:20","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":29768,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-21 19:09:20","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":13702,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-21 20:12:11","func_code":"def power(i, power):\n if i == i ** power:\n return i\n power(i * i, power)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":13538,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-21 20:12:30","func_code":"def power(i, power):\n if i == i ** power:\n print(i)\n return i\n power(i * i, power)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":33063,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-21 20:15:35","func_code":"def power(i, power):\n if i == i ** power:\n return i\n i *= i\n power(i, power)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":2648,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-21 20:17:17","func_code":"def power(i, n):\n if i == i ** n:\n print(i)\n return i\n i *= i\n power(i, n)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":34710,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-21 20:25:31","func_code":"def power(i, n):\n return i ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":21935,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-21 20:25:41","func_code":"def power(i, n):\n return i ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":12694,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-21 20:29:12","func_code":"def power(i, n):\n if n == 0:\n return 1\n else:\n return i * power(i, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":15035,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-21 20:29:19","func_code":"def power(i, n):\n if n == 0:\n return 1\n else:\n return i * power(i, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":28792,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-21 20:29:19","func_code":"def power(i, n):\n if n == 0:\n return 1\n else:\n return i * power(i, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":20218,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-21 20:29:19","func_code":"def power(i, n):\n if n == 0:\n return 1\n else:\n return i * power(i, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":6488,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-21 21:24:50","func_code":"def minimum(numbers):\n count = 0\n for i in numbers:\n if i > count:\n count = i\n return count","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":37465,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-21 21:26:24","func_code":"def minimum(numbers):\n count = numbers[0]\n for i in numbers:\n if i < count:\n count = i\n return count","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":13058,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-21 21:26:24","func_code":"def minimum(numbers):\n count = numbers[0]\n for i in numbers:\n if i < count:\n count = i\n return count","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":33348,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 21:32:57","func_code":"def power(n, p):\n if p == 0:\n return 1\n else:\n return power(n, p - 1) * n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":12124,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 21:32:57","func_code":"def power(n, p):\n if p == 0:\n return 1\n else:\n return power(n, p - 1) * n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":41319,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 21:38:26","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":34544,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 21:38:26","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":28743,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 21:39:51","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":5153,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 21:39:51","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":20808,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-21 21:49:18","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":12386,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-21 21:49:18","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":11787,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-21 21:49:18","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":38815,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 22:03:07","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":15185,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 22:03:07","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":20133,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 22:09:03","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":6036,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 22:09:03","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":190,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 22:33:17","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":32709,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 22:33:17","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":11215,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 23:14:55","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":37426,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 23:14:55","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":36500,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 23:15:48","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":38584,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 23:15:48","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":8800,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-04-21 23:15:48","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":1027,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-22 00:42:43","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":13880,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-22 00:42:43","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":20335,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-22 00:45:06","func_code":"def count_letters(line=''):\n print(len(line))","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":26407,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-22 00:45:24","func_code":"def count_letters(line=''):\n return len(line)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":35337,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-22 00:45:24","func_code":"def count_letters(line=''):\n return len(line)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":11704,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-22 00:45:24","func_code":"def count_letters(line=''):\n return len(line)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":15902,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-22 21:40:43","func_code":"def power(m, n):\n if n == 1:\n return m\n if n < 1:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":41517,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-22 21:40:43","func_code":"def power(m, n):\n if n == 1:\n return m\n if n < 1:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":41533,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-22 21:40:43","func_code":"def power(m, n):\n if n == 1:\n return m\n if n < 1:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":11553,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:15:00","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":39680,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:33:26","func_code":"def minimum(s):\n min = s[0]\n for c in s[1:]:\n if c < min:\n min = c\n return min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":10999,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:35:34","func_code":"def maximum(s):\n max = s[0]\n for c in s[1:]:\n if c > max:\n max = c\n return max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":22299,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:48:39","func_code":"def reverse_list(s):\n return s[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":1119,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:50:18","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":3802,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:50:18","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10386,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:57:15","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":38442,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:57:15","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":10196,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:58:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":22642,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 08:58:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":8514,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:00:50","func_code":"def count_letters(s):\n if len(s) == 0:\n return 0\n s = list(s)\n s.remove(s[0])\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":6939,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:00:50","func_code":"def count_letters(s):\n if len(s) == 0:\n return 0\n s = list(s)\n s.remove(s[0])\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":17540,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:12:46","func_code":"def power(m, n):\n if m == 1 or n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":34636,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:12:46","func_code":"def power(m, n):\n if m == 1 or n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":22709,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:15:26","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":18391,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:15:26","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":22649,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:16:37","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":23774,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:16:37","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":29652,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:18:00","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n t = s[-1]\n s.pop()\n return [t] + reverse_list(s)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":23891,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:18:00","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n t = s[-1]\n s.pop()\n return [t] + reverse_list(s)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":5333,"user":"c0bd18cc-b8fa-4b4a-87c2-5e1043d7ff6c","date":"2017-04-23 09:18:00","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n t = s[-1]\n s.pop()\n return [t] + reverse_list(s)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":25062,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-23 15:17:46","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10415,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-23 15:17:46","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":13166,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-23 15:17:46","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10176,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 15:48:25","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":24200,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 15:48:49","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":4623,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 15:48:49","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":32109,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 16:32:36","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":26875,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 16:32:36","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":9516,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 16:39:55","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":4252,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 16:39:55","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":13684,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 16:45:32","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":41711,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 16:45:32","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":40154,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 17:04:55","func_code":"def minimum(a):\n i = 1\n mini = a[0]\n while i < len(a):\n if mini < a[i]:\n mini = mini\n elif mini > a[i]:\n mini = a[i]\n i += 1\n return mini","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":16526,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 17:04:55","func_code":"def minimum(a):\n i = 1\n mini = a[0]\n while i < len(a):\n if mini < a[i]:\n mini = mini\n elif mini > a[i]:\n mini = a[i]\n i += 1\n return mini","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":13028,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:05:33","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":38277,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:05:33","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":817,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 17:08:49","func_code":"def maximum(a):\n i = 1\n mini = a[0]\n while i < len(a):\n if mini > a[i]:\n mini = mini\n elif mini < a[i]:\n mini = a[i]\n i += 1\n return mini","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":4827,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 17:08:49","func_code":"def maximum(a):\n i = 1\n mini = a[0]\n while i < len(a):\n if mini > a[i]:\n mini = mini\n elif mini < a[i]:\n mini = a[i]\n i += 1\n return mini","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":37918,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:12:59","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":31259,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:13:17","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":26715,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:13:17","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":42425,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:19:52","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":29542,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:19:52","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39517,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:37:56","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":1591,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:37:56","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":12283,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:43:14","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":40669,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:43:14","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":5796,"user":"99a8a900-efcf-4a9e-86ba-fdd0df4312d3","date":"2017-04-23 17:43:14","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":26446,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 17:46:16","func_code":"def count_letters(a):\n al = list(a)\n tot = 0\n for c in al:\n tot += +1\n return tot","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":19859,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 17:46:16","func_code":"def count_letters(a):\n al = list(a)\n tot = 0\n for c in al:\n tot += +1\n return tot","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":40299,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 19:00:44","func_code":"def reverse_list(a):\n return a[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":38881,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-23 19:00:44","func_code":"def reverse_list(a):\n return a[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":3435,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 19:19:13","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":8307,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 19:19:13","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":38754,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:35:16","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":32999,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:35:16","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":16773,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:10","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":28900,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:10","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":15473,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:15","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":24307,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:15","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":1896,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:20","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":20028,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:20","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":38649,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:32","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":23224,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:37:32","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":21326,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:38:20","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":10469,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:38:20","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":6928,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:39:56","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":28374,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:39:56","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":19047,"user":"6a42703e-da42-4824-8b83-b6f291ad71be","date":"2017-04-23 19:39:56","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":29769,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 19:58:14","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":13238,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 19:58:14","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":25915,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 20:51:53","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":31205,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 20:51:53","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":10208,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 20:59:30","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":16828,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 20:59:30","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":31747,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 21:04:17","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":28696,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 21:04:17","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":1460,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-23 21:04:17","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":10412,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-23 23:55:49","func_code":"def minimum(line=[]):\n m = line[0]\n for i in line:\n if i < m:\n m = i\n return m","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":23133,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-23 23:55:49","func_code":"def minimum(line=[]):\n m = line[0]\n for i in line:\n if i < m:\n m = i\n return m","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":38782,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-23 23:58:52","func_code":"def maximum(line=[]):\n m = line[0]\n for i in line:\n if i > m:\n m = i\n return m","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":27715,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-23 23:58:52","func_code":"def maximum(line=[]):\n m = line[0]\n for i in line:\n if i > m:\n m = i\n return m","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":34375,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-23 23:58:52","func_code":"def maximum(line=[]):\n m = line[0]\n for i in line:\n if i > m:\n m = i\n return m","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":40374,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 00:05:47","func_code":"def reverse_list(a=[]):\n a.reverse()\n return a","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":19293,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 00:05:47","func_code":"def reverse_list(a=[]):\n a.reverse()\n return a","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":2128,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 00:11:01","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7297,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 00:11:01","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":38332,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 01:51:34","func_code":"def selectionsort(a):\n for i in range(len(a)):\n for j in range(i + 1, len(a)):\n if a[i] > a[j]:\n a[i], a[j] = a[j], a[i]\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":29396,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 01:51:46","func_code":"def selectionsort(a):\n for i in range(len(a)):\n for j in range(i + 1, len(a)):\n if a[i] > a[j]:\n a[i], a[j] = a[j], a[i]\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":29277,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 01:51:46","func_code":"def selectionsort(a):\n for i in range(len(a)):\n for j in range(i + 1, len(a)):\n if a[i] > a[j]:\n a[i], a[j] = a[j], a[i]\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":31648,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 01:56:29","func_code":"def quicksort(a):\n less = []\n equal = []\n greater = []\n if len(a) > 1:\n pivot = a[0]\n for x in a:\n if x < pivot:\n less.append(x)\n if x == pivot:\n equal.append(x)\n if x > pivot:\n greater.append(x)\n return sort(less) + equal + sort(greater)\n else:\n return a","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":38176,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 02:01:06","func_code":"def quicksort(a):\n less = []\n equal = []\n greater = []\n if len(a) > 1:\n pivot = a[0]\n for x in a:\n if x < pivot:\n less.append(x)\n if x == pivot:\n equal.append(x)\n if x > pivot:\n greater.append(x)\n return sort(less) + equal + sort(greater)\n else:\n return a","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":21469,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 02:04:13","func_code":"def quicksort(a):\n less = []\n equal = []\n greater = []\n if len(a) > 1:\n pivot = a[0]\n for x in a:\n if x < pivot:\n less.append(x)\n if x == pivot:\n equal.append(x)\n if x > pivot:\n greater.append(x)\n return sort(less) + equal + sort(greater)\n else:\n return a","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":33334,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 02:05:26","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n return A","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":6516,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 02:05:26","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n return A","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":35036,"user":"f463a026-5eb4-4a39-a858-3a798215a4ee","date":"2017-04-24 02:05:26","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n return A","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":41328,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:19:22","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":26788,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:19:22","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":25346,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:20:02","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":40892,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:20:02","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":17606,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:41:41","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":30343,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:41:41","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":10611,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:47:48","func_code":"def fibonacci(N):\n if N == 0 or N == 1:\n return 1\n return fibonacci(N - 1) + fibonacci(N - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":4110,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 11:47:48","func_code":"def fibonacci(N):\n if N == 0 or N == 1:\n return 1\n return fibonacci(N - 1) + fibonacci(N - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26937,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 11:54:37","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":25247,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 11:54:37","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":36668,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 12:00:08","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return ()\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":32721,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 12:00:08","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return ()\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":33161,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:19:29","func_code":"def power(base, power2):\n if base == 0:\n return 'invalid'\n if power2 == 0:\n return 1\n elif power2 == 1:\n return base\n else:\n return base * power(base, power2 - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":5720,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:19:29","func_code":"def power(base, power2):\n if base == 0:\n return 'invalid'\n if power2 == 0:\n return 1\n elif power2 == 1:\n return base\n else:\n return base * power(base, power2 - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":22128,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:19:31","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":15862,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:19:31","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":25996,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-24 12:21:28","func_code":"def power(m, n):\n m = m ** n\n return m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":3372,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-24 12:21:28","func_code":"def power(m, n):\n m = m ** n\n return m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":6731,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 12:22:18","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":1369,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 12:22:18","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":4964,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:23:26","func_code":"def minimum(a):\n m = a[0]\n for n in a:\n if m > n:\n m = n\n return m","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":3534,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:23:26","func_code":"def minimum(a):\n m = a[0]\n for n in a:\n if m > n:\n m = n\n return m","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":24125,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 12:26:03","func_code":"def minimum(numbers):\n if len(numbers) == 1:\n return numbers[0]\n elif numbers[0] < numbers[1]:\n numbers.remove[numbers[1]]\n else:\n numbers.remove(numbers[0])\n return minimum(numbers)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":19878,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:26:51","func_code":"def power(x, y):\n return x ** y","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":20145,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:26:51","func_code":"def power(x, y):\n return x ** y","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":30078,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:27:01","func_code":"def maximum(a):\n m = a[0]\n for n in a:\n if m < n:\n m = n\n return m","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":18675,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:27:01","func_code":"def maximum(a):\n m = a[0]\n for n in a:\n if m < n:\n m = n\n return m","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":20714,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:27:59","func_code":"def minimum(a):\n a = sorted(a)\n return a[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":9577,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:28:20","func_code":"def minimum(a):\n a = sorted(a)\n return a[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":10547,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:28:20","func_code":"def minimum(a):\n a = sorted(a)\n return a[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":8689,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:29:13","func_code":"def minimum(collection, itera=0, mini=None):\n if itera == 0:\n mini = collection[0]\n if len(collection) == itera:\n return mini\n if mini > collection[itera]:\n mini = collection[itera]\n return minimum(collection, itera + 1, mini)\n else:\n return minimum(collection, itera + 1, mini)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":5252,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:29:13","func_code":"def minimum(collection, itera=0, mini=None):\n if itera == 0:\n mini = collection[0]\n if len(collection) == itera:\n return mini\n if mini > collection[itera]:\n mini = collection[itera]\n return minimum(collection, itera + 1, mini)\n else:\n return minimum(collection, itera + 1, mini)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":39585,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:29:26","func_code":"def minimum(l):\n return sorted(l)[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":28209,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:29:26","func_code":"def minimum(l):\n return sorted(l)[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":30050,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:30:09","func_code":"def maximum(collection, itera=0, mini=None):\n if itera == 0:\n mini = collection[0]\n if len(collection) == itera:\n return mini\n if mini < collection[itera]:\n mini = collection[itera]\n return minimum(collection, itera + 1, mini)\n else:\n return minimum(collection, itera + 1, mini)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":34661,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:30:36","func_code":"def maximum(collection, itera=0, mini=None):\n if itera == 0:\n mini = collection[0]\n if len(collection) == itera:\n return mini\n if mini < collection[itera]:\n mini = collection[itera]\n return minimum(collection, itera + 1, mini)\n else:\n return minimum(collection, itera + 1, mini)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":27315,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 12:30:38","func_code":"def minimum(numbers):\n if len(numbers) == 1:\n return numbers[0]\n if numbers[0] < numbers[1]:\n numbers.remove(numbers[1])\n else:\n numbers.remove(numbers[0])\n return minimum(numbers)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":40532,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 12:30:38","func_code":"def minimum(numbers):\n if len(numbers) == 1:\n return numbers[0]\n if numbers[0] < numbers[1]:\n numbers.remove(numbers[1])\n else:\n numbers.remove(numbers[0])\n return minimum(numbers)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":6485,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:30:52","func_code":"def maximum(collection, itera=0, mini=None):\n if itera == 0:\n mini = collection[0]\n if len(collection) == itera:\n return mini\n if mini < collection[itera]:\n mini = collection[itera]\n return maximum(collection, itera + 1, mini)\n else:\n return maximum(collection, itera + 1, mini)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":32175,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:30:52","func_code":"def maximum(collection, itera=0, mini=None):\n if itera == 0:\n mini = collection[0]\n if len(collection) == itera:\n return mini\n if mini < collection[itera]:\n mini = collection[itera]\n return maximum(collection, itera + 1, mini)\n else:\n return maximum(collection, itera + 1, mini)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":19608,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:30:54","func_code":"def maximum(a):\n a = sorted(a)\n return a[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":2697,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:30:54","func_code":"def maximum(a):\n a = sorted(a)\n return a[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":5712,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:31:07","func_code":"def maximum(l):\n return sorted(l)[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":14995,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:31:07","func_code":"def maximum(l):\n return sorted(l)[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":9933,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:32:16","func_code":"def count_letters(s):\n return len(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":39014,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:32:37","func_code":"def count_letters(s):\n return len(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":10882,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:32:37","func_code":"def count_letters(s):\n return len(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":25160,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 12:32:49","func_code":"def maximum(numbers):\n if len(numbers) == 1:\n return numbers[0]\n if numbers[0] > numbers[1]:\n numbers.remove(numbers[1])\n else:\n numbers.remove(numbers[0])\n return maximum(numbers)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":30747,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 12:32:49","func_code":"def maximum(numbers):\n if len(numbers) == 1:\n return numbers[0]\n if numbers[0] > numbers[1]:\n numbers.remove(numbers[1])\n else:\n numbers.remove(numbers[0])\n return maximum(numbers)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":7058,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-24 12:40:16","func_code":"def minimum(m=[]):\n i = 0\n a = m[i]\n while i < len(m):\n if a > m[i]:\n a = m[i]\n i += 1\n return a","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":37335,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-24 12:40:16","func_code":"def minimum(m=[]):\n i = 0\n a = m[i]\n while i < len(m):\n if a > m[i]:\n a = m[i]\n i += 1\n return a","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":39604,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-24 12:41:34","func_code":"def maximum(m=[]):\n i = 0\n a = m[i]\n while i < len(m):\n if a < m[i]:\n a = m[i]\n i += 1\n return a","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":24118,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-24 12:41:34","func_code":"def maximum(m=[]):\n i = 0\n a = m[i]\n while i < len(m):\n if a < m[i]:\n a = m[i]\n i += 1\n return a","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":24387,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-24 12:41:34","func_code":"def maximum(m=[]):\n i = 0\n a = m[i]\n while i < len(m):\n if a < m[i]:\n a = m[i]\n i += 1\n return a","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":10457,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:44:03","func_code":"def reverse_list(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - 1 - i]\n a[len(a) - 1 - i] = tmp\n i += 1\n return a","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":23927,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 12:44:03","func_code":"def reverse_list(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - 1 - i]\n a[len(a) - 1 - i] = tmp\n i += 1\n return a","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":26074,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:44:29","func_code":"def count_letters(inputed, counter=0):\n if inputed[:-1] == '':\n return counter\n if counter == 0:\n counter += 1\n return count_letters(inputed[:-1], counter + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":40270,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:44:29","func_code":"def count_letters(inputed, counter=0):\n if inputed[:-1] == '':\n return counter\n if counter == 0:\n counter += 1\n return count_letters(inputed[:-1], counter + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":3606,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 12:47:08","func_code":"def power(a, b):\n return a ** b","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":36532,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 12:48:31","func_code":"def minimum(a):\n return min(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":26939,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:49:29","func_code":"def count_letters(s):\n i = 0\n for c in s:\n i += 1\n return i","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":5648,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:50:35","func_code":"def reverse_list(input_list, workinglist=[], new=True):\n if new:\n workinglist = []\n if len(input_list) == 0:\n return workinglist\n else:\n workinglist.append(input_list[-1])\n return reverse_list(input_list[:-1], workinglist, False)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":7991,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:50:35","func_code":"def reverse_list(input_list, workinglist=[], new=True):\n if new:\n workinglist = []\n if len(input_list) == 0:\n return workinglist\n else:\n workinglist.append(input_list[-1])\n return reverse_list(input_list[:-1], workinglist, False)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":5881,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-24 12:50:35","func_code":"def reverse_list(input_list, workinglist=[], new=True):\n if new:\n workinglist = []\n if len(input_list) == 0:\n return workinglist\n else:\n workinglist.append(input_list[-1])\n return reverse_list(input_list[:-1], workinglist, False)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":14073,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 12:54:12","func_code":"def power(x, n):\n if n == 0:\n return 1\n elif n == 1:\n return x\n else:\n return x * power(x, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":8561,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 12:54:12","func_code":"def power(x, n):\n if n == 0:\n return 1\n elif n == 1:\n return x\n else:\n return x * power(x, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":30512,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:56:41","func_code":"def count_letters(s):\n i = 0\n for c in s:\n i += 1\n return i","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":14483,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:56:41","func_code":"def count_letters(s):\n i = 0\n for c in s:\n i += 1\n return i","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":28813,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:56:53","func_code":"def reverse_list(a):\n m = a[::-1]\n return m","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":7888,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 12:56:53","func_code":"def reverse_list(a):\n m = a[::-1]\n return m","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":23563,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 12:58:02","func_code":"def fibonacci(n):\n if n <= 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":36873,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:58:17","func_code":"def count_letters(s):\n if s == '':\n return 0\n count = 0\n for c in s:\n count += 1\n return count","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":4051,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 12:58:17","func_code":"def count_letters(s):\n if s == '':\n return 0\n count = 0\n for c in s:\n count += 1\n return count","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":13982,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 12:58:26","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":41406,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 12:58:26","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":30765,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:01:38","func_code":"def minimum(a):\n if len(a) == 1:\n return a\n else:\n if a[0] < a[1]:\n del a[1]\n else:\n del a[0]\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":41914,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:01:52","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n else:\n if a[0] < a[1]:\n del a[1]\n else:\n del a[0]\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":40529,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:01:52","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n else:\n if a[0] < a[1]:\n del a[1]\n else:\n del a[0]\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":23795,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:02:49","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23266,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:02:49","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":12415,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 13:03:16","func_code":"def reverse_list(l, s=None):\n if s == None:\n s = []\n if l == []:\n return s\n else:\n s.append(l[-1])\n l.remove(l[-1])\n return reverse_list(l, s)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":10630,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 13:03:16","func_code":"def reverse_list(l, s=None):\n if s == None:\n s = []\n if l == []:\n return s\n else:\n s.append(l[-1])\n l.remove(l[-1])\n return reverse_list(l, s)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":13271,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:03:36","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n else:\n if a[0] > a[1]:\n del a[1]\n else:\n del a[0]\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":36968,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:03:36","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n else:\n if a[0] > a[1]:\n del a[1]\n else:\n del a[0]\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":1206,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:07:36","func_code":"def count_letters(s):\n if not s:\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":31838,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:07:36","func_code":"def count_letters(s):\n if not s:\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":37030,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 13:08:56","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":1110,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 13:08:56","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":4844,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-24 13:08:56","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":41061,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 13:09:27","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":18185,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 13:09:27","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":29837,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:11:27","func_code":"def reverse_list(l):\n if l == []:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":3582,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:11:27","func_code":"def reverse_list(l):\n if l == []:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":14592,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:13:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":18900,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:14:20","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":34510,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:14:29","func_code":"def reverse_list(a):\n return reverse_list(a[1:]) + a[0]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":37463,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:15:41","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":38022,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:15:41","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":12191,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:16:38","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":28171,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:16:38","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":36132,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:17:49","func_code":"def reverse_list(a):\n return reverse_list(a[1:]) + [a[0]]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":37258,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:19:47","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":26602,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:21:05","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":30451,"user":"f98e9d61-9e86-4fed-86db-3cf718c5962d","date":"2017-04-24 13:21:05","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":21253,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 13:22:55","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n else:\n return [s[-1]] + reverse_list(s[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":6594,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 13:22:55","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n else:\n return [s[-1]] + reverse_list(s[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":15163,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:28:43","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":22130,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:28:43","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":22482,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:31:04","func_code":"def reverse_list(l, i=None):\n if i is None:\n i = len(l) - 1\n if i > 0:\n return reverse_list(l[1:] + [l[0]], i - 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":1586,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:32:53","func_code":"def reverse_list(l, i=None):\n if i is None:\n i = len(l) - 1\n if i >= 0:\n return reverse_list(l[1:] + [l[0]], i - 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":36074,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:33:10","func_code":"def reverse_list(l, i=None):\n if i is None:\n i = len(l)\n if i > 0:\n return reverse_list(l[1:] + [l[0]], i - 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":13396,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:33:38","func_code":"def reverse_list(l, i=None):\n if i is None:\n i = len(l) \/\/ 2\n if i > 0:\n return reverse_list(l[1:] + [l[0]], i - 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":10936,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:33:55","func_code":"def reverse_list(l, i=None):\n if i is None:\n i = len(l) \/\/ 2\n if i >= 0:\n return reverse_list(l[1:] + [l[0]], i - 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":23727,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 13:34:42","func_code":"def count_letters(s):\n if s == ' ':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":3972,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:34:48","func_code":"def selectionsort(A):\n i = 0\n while i < len(A) - 1:\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":25531,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:34:48","func_code":"def selectionsort(A):\n i = 0\n while i < len(A) - 1:\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":41460,"user":"07676427-a705-4cb7-a5ef-6a1c3c67c950","date":"2017-04-24 13:34:48","func_code":"def selectionsort(A):\n i = 0\n while i < len(A) - 1:\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":11961,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 13:36:05","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":22881,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 13:36:05","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":6971,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 13:42:48","func_code":"def power(m, n):\n if n == 0:\n return 1\n elif n == 1:\n return m\n else:\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":9091,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 13:42:48","func_code":"def power(m, n):\n if n == 0:\n return 1\n elif n == 1:\n return m\n else:\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":6634,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:48:04","func_code":"def reverse_list(l, i=0):\n if i < len(l) \/\/ 2:\n l[i], l[-i - 1] = l[-i - 1], l[i]\n return reverse_list(l, i + 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":22971,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 13:48:04","func_code":"def reverse_list(l, i=0):\n if i < len(l) \/\/ 2:\n l[i], l[-i - 1] = l[-i - 1], l[i]\n return reverse_list(l, i + 1)\n else:\n return l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":2432,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 13:53:56","func_code":"def lowest(first, rest):\n if len(rest) == 0:\n return first\n if first > rest[0] or first < 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n\n\ndef minimum(l):\n\n def lowest(first, rest):\n if len(rest) == 0:\n return first\n if first > rest[0] or first < 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n return lowest(l[0], l[1:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":33596,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 13:54:20","func_code":"def lowest(first, rest):\n if len(rest) == 0:\n return first\n if first > rest[0] or first <= 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n\n\ndef minimum(l):\n\n def lowest(first, rest):\n if len(rest) == 0:\n return first\n if first > rest[0] or first <= 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n return lowest(l[0], l[1:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":9523,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 13:55:41","func_code":"def lowest(first, rest):\n if len(rest) == 0:\n return first\n if first > rest[0] or first < 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n\n\ndef minimum(l=None):\n if l == None:\n l = []\n\n def lowest(first, rest):\n if len(rest) == 0:\n return first\n if first > rest[0] or first < 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n return lowest(l[0], l[1:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":17011,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 13:56:16","func_code":"def lowest(first, rest):\n if len(rest) == 0:\n return first\n elif first > rest[0] or first < 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n\n\ndef minimum(l=None):\n if l == None:\n l = []\n\n def lowest(first, rest):\n if len(rest) == 0:\n return first\n elif first > rest[0] or first < 0:\n return lowest(rest[0], rest[1:])\n else:\n return lowest(first, rest[1:])\n return lowest(l[0], l[1:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":33215,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:02:48","func_code":"def selectionsort(a):\n i = 0\n p = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":428,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:02:48","func_code":"def selectionsort(a):\n i = 0\n p = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":17206,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:07:08","func_code":"def minimum(l, current_min=None):\n if not l:\n return current_min\n first = l.pop()\n if current_min == None or first < current_min:\n return minimum(l, first)\n return minimum(l, current_min)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":40564,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:07:08","func_code":"def minimum(l, current_min=None):\n if not l:\n return current_min\n first = l.pop()\n if current_min == None or first < current_min:\n return minimum(l, first)\n return minimum(l, current_min)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":27397,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:09:37","func_code":"def maximum(l, current_max=None):\n if not l:\n return current_max\n first = l.pop()\n if current_max == None or first > current_max:\n return maximum(l, first)\n return maximum(l, current_max)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":42232,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:09:37","func_code":"def maximum(l, current_max=None):\n if not l:\n return current_max\n first = l.pop()\n if current_max == None or first > current_max:\n return maximum(l, first)\n return maximum(l, current_max)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":33577,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:11:55","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":14266,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:11:55","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":31602,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:17:14","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":7756,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:17:36","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":38598,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:17:36","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":1266,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:22:27","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":29995,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:22:52","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":32690,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:23:13","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":26316,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:23:53","func_code":"def reverse_list(l):\n if l == []:\n return l\n return l[-1:] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":19871,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:23:53","func_code":"def reverse_list(l):\n if l == []:\n return l\n return l[-1:] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":21968,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:24:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":17798,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:25:01","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":25061,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:26:14","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n print(0)\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":17707,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:26:42","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return None\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":31034,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:26:56","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return 1\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":37642,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:27:55","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7515,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:27:55","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return n\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":32077,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:29:59","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":22560,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:29:59","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":30224,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:30:01","func_code":"def reverse_list(a):\n if len(a) == 1:\n return []\n else:\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":8615,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:30:12","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":29631,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:31:16","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":24725,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:31:16","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":29678,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:31:23","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n else:\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":10903,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:31:23","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n else:\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":19373,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:32:46","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":34341,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:33:06","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":2037,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:33:12","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":12119,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:33:48","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":5792,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 14:38:46","func_code":"def minimum(s):\n if len(s) == 1:\n return 0\n else:\n max = maxElement(L[1:])\n if L[0] > max:\n return L[0]\n else:\n return max","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":35531,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:41:22","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":25268,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:41:22","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":11691,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:41:25","func_code":"def count_letters(s):\n if s == ' ':\n return 0\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":16142,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 14:41:55","func_code":"def minimum(s):\n if n == 1:\n return s[0]\n else:\n min = minimum(s[1:], n - 1)\n if s[0] < min:\n return s[0]\n else:\n return min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":11515,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 14:42:12","func_code":"def minimum(s):\n if s == 1:\n return s[0]\n else:\n min = minimum(s[1:], s - 1)\n if s[0] < min:\n return s[0]\n else:\n return min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":18759,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:42:31","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":21137,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:42:31","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":20747,"user":"66e06699-d10a-47f1-a343-55edd72e95d2","date":"2017-04-24 14:42:31","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":9467,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:42:50","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":30194,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:42:50","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":6237,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:46:40","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n j = i + 1\n while j < len(A):\n if A[j] < A[i]:\n A[j], A[i] = A[i], A[j]\n j += 1\n i += 1\n return A","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":11614,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:46:40","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n j = i + 1\n while j < len(A):\n if A[j] < A[i]:\n A[j], A[i] = A[i], A[j]\n j += 1\n i += 1\n return A","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":6143,"user":"ac1dec5e-a5eb-4183-ba72-3b639e82db3c","date":"2017-04-24 14:46:40","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n j = i + 1\n while j < len(A):\n if A[j] < A[i]:\n A[j], A[i] = A[i], A[j]\n j += 1\n i += 1\n return A","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":5346,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 14:48:56","func_code":"def minimum(s):\n if len(s) == 0:\n return 0\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":11894,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 14:49:15","func_code":"def minimum(s):\n if len(s) == 0:\n return 0\n else:\n min_ret = minimum(s[1:])\n return s[0] if s[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":32111,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 14:49:43","func_code":"def minimum(s):\n if len(s) == 1:\n return 0\n else:\n min_ret = minimum(s[1:])\n return s[0] if s[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":1304,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:50:02","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":39648,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:50:02","func_code":"def reverse_list(a):\n m = a[::-1]\n return m","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":24277,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:50:02","func_code":"def reverse_list(a):\n m = a[::-1]\n return m","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":23352,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:54:04","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n return A\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":1058,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:54:23","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1\n return A","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":15098,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:54:32","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fobonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":13291,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:54:49","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":19812,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:54:52","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":24593,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 14:54:52","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":14801,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:56:32","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":22658,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 14:56:32","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":17532,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:01:21","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":39181,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:03:04","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":5060,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:03:04","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":29868,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:04:54","func_code":"def minimum(s):\n if len(s) == 1:\n return s[0]\n else:\n min_ret = minimum(s[1:])\n return s[0] if s[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":3979,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:04:54","func_code":"def minimum(s):\n if len(s) == 1:\n return s[0]\n else:\n min_ret = minimum(s[1:])\n return s[0] if s[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":18287,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:05:56","func_code":"def quicksort(A, p, r):\n print(len(A))","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":20972,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:10:03","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, r - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":11154,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 15:10:04","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":23455,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 15:10:04","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":38263,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 15:10:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":36358,"user":"75a32f49-710d-463f-8fee-0ae9b91a3034","date":"2017-04-24 15:10:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":7678,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:10:43","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":4056,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:11:30","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":39767,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:11:30","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":37025,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:14:05","func_code":"def minimum(a):\n a_sorted = sorted(a)\n return a","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":25336,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:14:28","func_code":"def minimum(a):\n return sorted(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":3623,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:14:42","func_code":"def minimum(a):\n return sorted(a)[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":19197,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:14:42","func_code":"def minimum(a):\n return sorted(a)[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":40691,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:15:27","func_code":"def maximum(a):\n return sorted(a)[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":23998,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:15:27","func_code":"def maximum(a):\n return sorted(a)[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":32665,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:16:17","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":34985,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:16:31","func_code":"def count_letters(s):\n return len(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":23332,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:18:02","func_code":"def count_letters(s):\n total = 0\n for x in s:\n total += 1\n return total","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":22928,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:18:02","func_code":"def count_letters(s):\n total = 0\n for x in s:\n total += 1\n return total","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":38280,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:19:03","func_code":"def reverse_list(a):\n return a[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":9968,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:19:03","func_code":"def reverse_list(a):\n return a[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":8130,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:19:18","func_code":"def maximum(s):\n if len(s) == 1:\n return s[0]\n else:\n maxi = maximum(s[1:])\n return l[0] if l[0] > maxi else maxi","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":5612,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:19:32","func_code":"def maximum(s):\n if len(s) == 1:\n return s[0]\n else:\n maxi = maximum(s[1:])\n return s[0] if s[0] > maxi else maxi","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":23447,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:19:32","func_code":"def maximum(s):\n if len(s) == 1:\n return s[0]\n else:\n maxi = maximum(s[1:])\n return s[0] if s[0] > maxi else maxi","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":12267,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:22:40","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":18176,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:23:13","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":20508,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:23:13","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":32212,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:25:36","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, p + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":19639,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:27:36","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":40945,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:27:36","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":6269,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:28:44","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":2346,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:28:44","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":3239,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:28:48","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":38647,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:28:48","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":27060,"user":"8d8fa15f-3f0d-4a69-849b-9b7da96123cd","date":"2017-04-24 15:28:48","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":4156,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:29:43","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":31068,"user":"45fe5d71-35bd-4b87-b28c-71b204939543","date":"2017-04-24 15:29:43","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":12915,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:31:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":39923,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-04-24 15:31:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":16224,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 15:43:00","func_code":"def power(n, p):\n return n ** p","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":30820,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 15:43:00","func_code":"def power(n, p):\n return n ** p","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":14189,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:53:39","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":14936,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:53:39","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":6589,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:55:10","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":37438,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:55:10","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":12531,"user":"9a05c20e-2fde-40c1-948b-649e25b30e6e","date":"2017-04-24 15:55:10","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":19175,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 15:56:56","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n minv = minimum(l[1:])\n return l[0] if l[0] < minv else minv","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":29466,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 15:56:56","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n minv = minimum(l[1:])\n return l[0] if l[0] < minv else minv","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":7265,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 15:59:34","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n maxv = maximum(l[1:])\n return l[0] if l[0] > maxv else maxv","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":41145,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 15:59:34","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n maxv = maximum(l[1:])\n return l[0] if l[0] > maxv else maxv","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":14860,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:01:47","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":7570,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:01:47","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":40503,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-24 16:05:33","func_code":"def selectionsort(l):\n i = 0\n while i < len(l):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":15496,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:06:02","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return l[-1].append(reverse_list(s[:-1]))","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":5347,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-24 16:06:16","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":38539,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-24 16:06:16","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":206,"user":"b0c92748-3b02-4340-a9d8-2ebe9a693531","date":"2017-04-24 16:06:16","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":16959,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:06:20","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]].append(reverse_list(s[:-1]))","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":1768,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:06:34","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]].append(reverse_list(l[:-1]))","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":26379,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:07:10","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":31476,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:07:10","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":19693,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:10:19","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":2729,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:10:19","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39135,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:22:18","func_code":"def minimum(ints):\n if len(ints) == 1:\n return ints[0]\n elif ints[0] > ints[1]:\n ints.remove(ints[0])\n else:\n ints.remove(ints[1])\n return minimum(ints)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":19153,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:23:38","func_code":"def minimum(ints):\n if len(ints) == 1:\n return ints[0]\n elif ints[0] > ints[1]:\n ints.remove(ints[0])\n else:\n ints.remove(ints[1])\n return minimum(ints)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":24521,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:23:38","func_code":"def minimum(ints):\n if len(ints) == 1:\n return ints[0]\n elif ints[0] > ints[1]:\n ints.remove(ints[0])\n else:\n ints.remove(ints[1])\n return minimum(ints)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":16280,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:23:42","func_code":"def maximum(ints):\n if len(ints) == 1:\n return ints[0]\n elif ints[0] < ints[1]:\n ints.remove(ints[0])\n else:\n ints.remove(ints[1])\n return maximum(ints)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":35482,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:23:42","func_code":"def maximum(ints):\n if len(ints) == 1:\n return ints[0]\n elif ints[0] < ints[1]:\n ints.remove(ints[0])\n else:\n ints.remove(ints[1])\n return maximum(ints)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":20932,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:26:06","func_code":"def count_letters(string, count=0):\n if string == '':\n return count\n else:\n string = string[1:]\n return count_letters(string, count + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":17269,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:26:06","func_code":"def count_letters(string, count=0):\n if string == '':\n return count\n else:\n string = string[1:]\n return count_letters(string, count + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":25043,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:28:41","func_code":"def reverse_list(l, reverse=None):\n if reverse is None:\n reverse = []\n if not l:\n return reverse\n else:\n reverse.append(l[-1])\n l.remove(l[-1])\n return reverse_list(l, reverse)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":35334,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:28:41","func_code":"def reverse_list(l, reverse=None):\n if reverse is None:\n reverse = []\n if not l:\n return reverse\n else:\n reverse.append(l[-1])\n l.remove(l[-1])\n return reverse_list(l, reverse)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":5143,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:30:53","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":8813,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:32:32","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] < a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":8879,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:33:53","func_code":"def selectionsort(a):\n for done in range(len(a) - 1):\n min_value = a[done]\n min_index = done\n for i in range(done + 1, len(a)):\n if a[i] < min_value:\n min_value = a[i]\n min_index = i\n a[min_index], a[done] = a[done], a[min_index]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":35556,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 16:33:53","func_code":"def selectionsort(a):\n for done in range(len(a) - 1):\n min_value = a[done]\n min_index = done\n for i in range(done + 1, len(a)):\n if a[i] < min_value:\n min_value = a[i]\n min_index = i\n a[min_index], a[done] = a[done], a[min_index]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":24783,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:39:45","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":18703,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:39:45","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":35298,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:43:14","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":7373,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:44:06","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":40785,"user":"b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782","date":"2017-04-24 16:44:06","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":29699,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:20:30","func_code":"def power(n, p):\n if p == 0:\n return 1\n return n * power(n, p - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":14131,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:20:30","func_code":"def power(n, p):\n if p == 0:\n return 1\n return n * power(n, p - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":5455,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:25:09","func_code":"def minimum(l, c=None):\n if c == None:\n return minimum(l[1:], l[0])\n if l == []:\n return c\n if l[0] < c:\n return minimum(l[1:], l[0])\n else:\n return minimum(l[1:], c)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":17266,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:25:09","func_code":"def minimum(l, c=None):\n if c == None:\n return minimum(l[1:], l[0])\n if l == []:\n return c\n if l[0] < c:\n return minimum(l[1:], l[0])\n else:\n return minimum(l[1:], c)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":33238,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:25:49","func_code":"def maximum(l, c=None):\n if c == None:\n return minimum(l[1:], l[0])\n if l == []:\n return c\n if l[0] > c:\n return minimum(l[1:], l[0])\n else:\n return minimum(l[1:], c)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":41840,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:26:38","func_code":"def maximum(l, c=None):\n if c == None:\n return maximum(l[1:], l[0])\n if l == []:\n return c\n if l[0] > c:\n return maximum(l[1:], l[0])\n else:\n return maximum(l[1:], c)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":7101,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:26:38","func_code":"def maximum(l, c=None):\n if c == None:\n return maximum(l[1:], l[0])\n if l == []:\n return c\n if l[0] > c:\n return maximum(l[1:], l[0])\n else:\n return maximum(l[1:], c)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":20170,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:35:15","func_code":"def count_letters(word, current=0):\n if word == '':\n return current\n return count_letters(word[1:], current=current + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":27988,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:35:15","func_code":"def count_letters(word, current=0):\n if word == '':\n return current\n return count_letters(word[1:], current=current + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":23659,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:35:29","func_code":"def power(m, n):\n if n == 1:\n return m\n else:\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":33118,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:35:48","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":22348,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:35:48","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":23784,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:40:35","func_code":"def reverse_list(l, n=None):\n if l == []:\n return n\n if n == None:\n return reverse_list(l[:-1], [l[-1]])\n return reverse_list(l[:-1], n + [l[-1]])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":34217,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:43:34","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":17838,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:43:34","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":18526,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-24 17:43:34","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":22520,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:46:25","func_code":"def minimum(l):\n a = l[len(l)]\n if len(a) == 1:\n return l[0]\n if a >= minimum(l):\n return minimum([j for j in l[:-1]])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":16495,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:46:42","func_code":"def minimum(l):\n a = l[len(l) - 1]\n if len(a) == 1:\n return l[0]\n if a >= minimum(l):\n return minimum([j for j in l[:-1]])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":39828,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:47:04","func_code":"def minimum(l):\n a = l[len(l) - 1]\n if len(l) == 1:\n return l[0]\n if a >= minimum(l):\n return minimum([j for j in l[:-1]])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":34587,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:53:29","func_code":"def minimum(l):\n a = l[len(l) - 1]\n if len(l) == 1:\n return l[0]\n if a >= minimum(l[:-1]):\n return minimum(l[-1])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":17575,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:55:16","func_code":"def minimum(l):\n a = l[0]\n if len(l) == 1:\n return l[0]\n if a >= minimum(l[:-1]):\n return minimum(l[:-1])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":33566,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:56:35","func_code":"def minimum(l):\n a = l[0]\n if len(l) == 2:\n if l[1] >= l[0]:\n return l[0]\n else:\n return l[1]\n if a >= minimum(l[:-1]):\n return minimum(l[:-1])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":1533,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 17:58:29","func_code":"def minimum(l):\n a = l[0]\n if len(l) == 1:\n return l[0]\n elif a >= minimum(l):\n return minimum(l[:-1])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":21491,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:03:01","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n for i in l:\n if i >= minimum(l[1:]):\n return minimum(l[1:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":2489,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:06:44","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if minimum(l[:-1]) >= minimum(l[1:]):\n return minimum(l[1:])\n else:\n return minimum(l[:-1])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":29107,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:06:44","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if minimum(l[:-1]) >= minimum(l[1:]):\n return minimum(l[1:])\n else:\n return minimum(l[:-1])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":34998,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:08:40","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if maximum(l[:-1]) >= maximum(l[1:]):\n return maximum(l[:-1])\n else:\n return maximum(l[1:])","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":10506,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:08:40","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if maximum(l[:-1]) >= maximum(l[1:]):\n return maximum(l[:-1])\n else:\n return maximum(l[1:])","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":36598,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:14:36","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":37664,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:14:36","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":29779,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:18:53","func_code":"def reverse_list(l):\n if len(l) == 2:\n return l[1] + l[0]\n else:\n return reverse_list(l[1:]) + l[0]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":26465,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:20:11","func_code":"def reverse_list(l):\n if len(l) == 2:\n return list(''.join(l[1], l[0]))\n else:\n return list(''.join(reverse_list(l[1:]), l[0]))","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":7850,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:21:57","func_code":"def reverse_list(l):\n if len(l) == 2:\n return ''.join(l[1], l[0]).split()\n else:\n return ''.join(reverse_list(l[1]), l[0]).split()","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":7445,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:23:04","func_code":"def reverse_list(l):\n if len(l) == 2:\n return ' '.join(l[1], l[0]).split(' ')\n else:\n return ''.join(reverse_list(l[1]), l[0]).split()","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":12588,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:24:54","func_code":"def reverse_list(l):\n if len(l) == 2:\n return l[1].append(l[0])\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":39444,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:26:26","func_code":"def reverse_list(l):\n if len(l) == 2:\n a = []\n a.append(l[1])\n a.append(l[0])\n return a\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":37201,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:29:29","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return reverse_list(l).append(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":12539,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:29:53","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return reverse_list(l).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":5472,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:30:46","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":32541,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:31:39","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":4072,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:32:06","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n elif len(l) == 1:\n return l[0]\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":39489,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 18:32:55","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n elif len(l) == 1:\n return reverse_list(l[1:]).append(l[0])\n else:\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":26111,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:04:16","func_code":"def fibonacci(n):\n if n == 1 or n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":627,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:04:57","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":22466,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:04:57","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33540,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:32:55","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[p] >= a[j]:\n p = j\n j += 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":39907,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:32:55","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[p] >= a[j]:\n p = j\n j += 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":23810,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:35:34","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":32011,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:39:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":39492,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:39:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":6092,"user":"051d024e-69b1-48d1-ba77-a6f2d97a48bc","date":"2017-04-24 19:39:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":23626,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:19:02","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":31952,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:19:02","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":2112,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:49:32","func_code":"def minimum(list_1):\n i = 0\n total = '1000000'\n while i < len(list_1):\n if int(list_1[i]) <= int(total):\n total = list_1[i]\n else:\n 0\n i = i + 1\n return total","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":33468,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:49:32","func_code":"def minimum(list_1):\n i = 0\n total = '1000000'\n while i < len(list_1):\n if int(list_1[i]) <= int(total):\n total = list_1[i]\n else:\n 0\n i = i + 1\n return total","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":17233,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:51:31","func_code":"def maximum(list_1):\n i = 0\n total = 0\n while i < len(list_1):\n if int(list_1[i]) >= int(total):\n total = list_1[i]\n else:\n 0\n i = i + 1\n return total","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":8798,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:51:31","func_code":"def maximum(list_1):\n i = 0\n total = 0\n while i < len(list_1):\n if int(list_1[i]) >= int(total):\n total = list_1[i]\n else:\n 0\n i = i + 1\n return total","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":1934,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:53:19","func_code":"def count_letters(string):\n return len(string)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":11457,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:53:19","func_code":"def count_letters(string):\n return len(string)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":27700,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:56:39","func_code":"def reverse_list(list_1):\n return list_1[::1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":9266,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:57:13","func_code":"def reverse_list(list_1):\n return list_1[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":18477,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 20:57:13","func_code":"def reverse_list(list_1):\n return list_1[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":27762,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:16:40","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":12322,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:16:40","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":6358,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:31:42","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":30635,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:31:42","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":34143,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 21:35:42","func_code":"def fibonacci(pos):\n import sys\n prev = 0\n curr = 1\n i = 0\n if pos == 0:\n return 1\n else:\n while i < pos + 1:\n curr = prev + curr\n prev = curr - prev\n i = i + 1\n return prev","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":3055,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 21:35:42","func_code":"def fibonacci(pos):\n import sys\n prev = 0\n curr = 1\n i = 0\n if pos == 0:\n return 1\n else:\n while i < pos + 1:\n curr = prev + curr\n prev = curr - prev\n i = i + 1\n return prev","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":24680,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:43:20","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":11289,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:43:20","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":28541,"user":"6cbd9686-8a3c-4d12-8a1a-70c661732027","date":"2017-04-24 21:43:20","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":35415,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 21:50:10","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] < a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":32784,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 21:50:10","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] < a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":32581,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 21:50:21","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":22432,"user":"1a650795-f8bf-47db-90f0-c896555da6d7","date":"2017-04-24 21:50:21","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33363,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:14:27","func_code":"def power(n, m):\n if m == 0:\n return 1\n else:\n return n * power(n, m - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":14489,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:14:27","func_code":"def power(n, m):\n if m == 0:\n return 1\n else:\n return n * power(n, m - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":42311,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 22:18:25","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":19546,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 22:18:25","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":40725,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:26:59","func_code":"def minimum(m):\n if len(m) == 1:\n return m[0]\n else:\n a = m.pop()\n b = m.pop()\n if a < b:\n m.append(a)\n else:\n m.append(b)\n return minimum(m)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":8993,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:26:59","func_code":"def minimum(m):\n if len(m) == 1:\n return m[0]\n else:\n a = m.pop()\n b = m.pop()\n if a < b:\n m.append(a)\n else:\n m.append(b)\n return minimum(m)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":325,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:28:32","func_code":"def maximum(m):\n if len(m) == 1:\n return m[0]\n else:\n a = m.pop()\n b = m.pop()\n if a > b:\n m.append(a)\n else:\n m.append(b)\n return maximum(m)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":10185,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:28:32","func_code":"def maximum(m):\n if len(m) == 1:\n return m[0]\n else:\n a = m.pop()\n b = m.pop()\n if a > b:\n m.append(a)\n else:\n m.append(b)\n return maximum(m)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":10622,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:50:50","func_code":"def reverse_list(m):\n if len(m) == 1:\n return m\n else:\n return [m.pop()] + reverse_list(m)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":15920,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:52:06","func_code":"def reverse_list(m):\n if len(m) == 0:\n return m\n else:\n return [m.pop()] + reverse_list(m)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":37101,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:52:06","func_code":"def reverse_list(m):\n if len(m) == 0:\n return m\n else:\n return [m.pop()] + reverse_list(m)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":8472,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-24 22:52:06","func_code":"def reverse_list(m):\n if len(m) == 0:\n return m\n else:\n return [m.pop()] + reverse_list(m)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":39677,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 23:05:26","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n position = i\n j = i + 1\n while j < len(n):\n if n[j] < n[position]:\n position = j\n j = j + 1\n val = n[position]\n n[position] = n[i]\n n[i] = val\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":31396,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 23:05:26","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n position = i\n j = i + 1\n while j < len(n):\n if n[j] < n[position]:\n position = j\n j = j + 1\n val = n[position]\n n[position] = n[i]\n n[i] = val\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":17708,"user":"7a72123c-6850-4e9f-b407-211283f04a4c","date":"2017-04-24 23:05:26","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n position = i\n j = i + 1\n while j < len(n):\n if n[j] < n[position]:\n position = j\n j = j + 1\n val = n[position]\n n[position] = n[i]\n n[i] = val\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":10984,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-24 23:46:30","func_code":"def power(a, b):\n if b == 0:\n return 1\n return a * power(a, b - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":34172,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-24 23:46:30","func_code":"def power(a, b):\n if b == 0:\n return 1\n return a * power(a, b - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":7384,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-24 23:57:33","func_code":"def minimum(value):\n if len(value) == 1:\n return value[0]\n if value[0] < value[1]:\n value.remove(value[1])\n return minimum(value)\n else:\n value.remove(value[0])\n return minimum(value)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":25889,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-24 23:57:33","func_code":"def minimum(value):\n if len(value) == 1:\n return value[0]\n if value[0] < value[1]:\n value.remove(value[1])\n return minimum(value)\n else:\n value.remove(value[0])\n return minimum(value)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":897,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-24 23:57:33","func_code":"def minimum(value):\n if len(value) == 1:\n return value[0]\n if value[0] < value[1]:\n value.remove(value[1])\n return minimum(value)\n else:\n value.remove(value[0])\n return minimum(value)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":4595,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:00:06","func_code":"def maximum(number):\n if len(number) == 1:\n return number[0]\n if number[0] > number[1]:\n number.remove(number[1])\n return maximum(number)\n else:\n number.remove(number[0])\n return maximum(number)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":5849,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:00:06","func_code":"def maximum(number):\n if len(number) == 1:\n return number[0]\n if number[0] > number[1]:\n number.remove(number[1])\n return maximum(number)\n else:\n number.remove(number[0])\n return maximum(number)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":15422,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:06:03","func_code":"def count_letters(s):\n number = 0\n if not s:\n return 0\n else:\n number += 1\n return number + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":37277,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:06:03","func_code":"def count_letters(s):\n number = 0\n if not s:\n return 0\n else:\n number += 1\n return number + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":41057,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-25 00:29:27","func_code":"def quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)\n\n\ndef minimum(a):\n quicksort(a, 0, len(a) - 1)\n return a[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":3249,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-25 00:29:27","func_code":"def quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)\n\n\ndef minimum(a):\n quicksort(a, 0, len(a) - 1)\n return a[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":41175,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:29:44","func_code":"def reverse_list(value):\n if len(value) == 0:\n return []\n return [value[-1]] + reverse_list(value[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":25872,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:29:44","func_code":"def reverse_list(value):\n if len(value) == 0:\n return []\n return [value[-1]] + reverse_list(value[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":24175,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-25 00:30:30","func_code":"def quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)\n\n\ndef maximum(a):\n quicksort(a, 0, len(a) - 1)\n return a[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":13521,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-25 00:30:30","func_code":"def quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)\n\n\ndef maximum(a):\n quicksort(a, 0, len(a) - 1)\n return a[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":20652,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-25 00:34:12","func_code":"def count_letters(s):\n if s == '':\n return 0\n return count_letters(s[:-1]) + 1","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":32110,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-25 00:34:12","func_code":"def count_letters(s):\n if s == '':\n return 0\n return count_letters(s[:-1]) + 1","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":30612,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:46:05","func_code":"def fibonacci(value):\n if value == 1 or value == 0:\n return 1\n return fibonacci(value - 1) + fibonacci(value - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33592,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 00:46:05","func_code":"def fibonacci(value):\n if value == 1 or value == 0:\n return 1\n return fibonacci(value - 1) + fibonacci(value - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":22355,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 01:09:17","func_code":"def sort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = sort(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":4118,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 01:09:17","func_code":"def sort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = sort(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":4928,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-25 01:09:17","func_code":"def sort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = sort(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":8523,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-25 10:28:19","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":4890,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-25 10:29:13","func_code":"def fibonacci(n):\n if n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":21477,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-25 10:29:13","func_code":"def fibonacci(n):\n if n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10502,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:36:52","func_code":"def count_letters(a):\n return len(a)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":36221,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:36:52","func_code":"def count_letters(a):\n return len(a)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":25696,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:43:10","func_code":"def reverse_list(a):\n return a[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":26238,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:43:10","func_code":"def reverse_list(a):\n return a[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":7671,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:49:21","func_code":"def fibonacci(a):\n prev = 1\n curr = 1\n tmp = 0\n i = 0\n for i in range(0, a):\n tmp = curr\n curr = prev + curr\n prev = tmp","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33882,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:49:47","func_code":"def fibonacci(a):\n prev = 1\n curr = 1\n tmp = 0\n i = 0\n for i in range(0, a):\n tmp = curr\n curr = prev + curr\n prev = tmp\n return curr","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7655,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:50:02","func_code":"def fibonacci(a):\n prev = 1\n curr = 1\n tmp = 0\n i = 0\n for i in range(0, a):\n tmp = curr\n curr = prev + curr\n prev = tmp\n return prev","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":25437,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:50:30","func_code":"def fibonacci(a):\n prev = 1\n curr = 1\n for i in range(0, a):\n tmp = curr\n curr = prev + curr\n prev = tmp\n return prev","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":35852,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:50:30","func_code":"def fibonacci(a):\n prev = 1\n curr = 1\n for i in range(0, a):\n tmp = curr\n curr = prev + curr\n prev = tmp\n return prev","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10408,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:53:47","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":35093,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 10:53:47","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":12331,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 11:01:10","func_code":"def selectionsort(a):\n for i in range(0, len(a)):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":24706,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-25 11:01:10","func_code":"def selectionsort(a):\n for i in range(0, len(a)):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":40518,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 11:09:59","func_code":"def count_letters(m):\n if m == '':\n return 0\n else:\n return 1 + count_letters(m[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":3415,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 11:09:59","func_code":"def count_letters(m):\n if m == '':\n return 0\n else:\n return 1 + count_letters(m[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":3178,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 11:17:20","func_code":"def reverse_list(m):\n if len(m) == 0:\n return []\n else:\n return [m[-1]] + reverse_list(m[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":38531,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 11:17:20","func_code":"def reverse_list(m):\n if len(m) == 0:\n return []\n else:\n return [m[-1]] + reverse_list(m[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":3994,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 11:23:10","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":242,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 11:23:10","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":38023,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 11:50:08","func_code":"def power(n, c):\n return n ** c","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":39865,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 11:50:08","func_code":"def power(n, c):\n return n ** c","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":41522,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:15:29","func_code":"def minimum(n):\n if n == 0:\n return 0\n i = 1\n p = 0\n while i < len(n):\n if n[i] < n[p]:\n n[p] = n[i]\n i = i + 1\n return n[p]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":22936,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:17:52","func_code":"def minimum(n):\n if len(n) == 1:\n return l[0]\n else:\n minr = minimum(n[1:])\n return n[0] if n[0] < minr else minr","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":38890,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:18:12","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n else:\n minr = minimum(n[1:])\n return n[0] if n[0] < minr else minr","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":22275,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:18:12","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n else:\n minr = minimum(n[1:])\n return n[0] if n[0] < minr else minr","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":28783,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:33:17","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n maxr = maxi(n[1:])\n return n[0] if n[0] > maxr else minr","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":27080,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:33:53","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n maxr = maximum(n[1:])\n return n[0] if n[0] > maxr else minr","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":4630,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:33:56","func_code":"def power(num, pwr):\n return num ** pwr","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":6395,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:33:56","func_code":"def power(num, pwr):\n return num ** pwr","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":34159,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:34:18","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n maxr = maximum(n[1:])\n return n[0] if n[0] > maxr else maxr","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":8682,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:34:18","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n maxr = maximum(n[1:])\n return n[0] if n[0] > maxr else maxr","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":41111,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:35:33","func_code":"def minimum(l):\n l = sorted(l)\n return l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":26835,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:35:33","func_code":"def minimum(l):\n l = sorted(l)\n return l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":22238,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:36:22","func_code":"def power(x, n):\n if n == 0:\n return 1\n elif n == 1:\n return x\n else:\n return x * power(x, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":21930,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:36:22","func_code":"def power(x, n):\n if n == 0:\n return 1\n elif n == 1:\n return x\n else:\n return x * power(x, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":12823,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:36:40","func_code":"def maximum(l):\n l = sorted(l)\n return l[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":2925,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:36:40","func_code":"def maximum(l):\n l = sorted(l)\n return l[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":27211,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:38:44","func_code":"def count_letters(string_):\n len(string_)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":29011,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-25 12:38:54","func_code":"def power(x, y):\n if y == 0:\n return x\n return power(x ** y, y - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":37580,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:39:03","func_code":"def count_letters(n):\n if len(n) == 1:\n return n[0]\n length = len(n)\n return length","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":2907,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:39:31","func_code":"def count_letters(string_):\n counter = 0\n for i in string:\n counter += 1\n return counter","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":12958,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:39:45","func_code":"def count_letters(string_):\n counter = 0\n for i in string_:\n counter += 1\n return counter","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":4824,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 12:39:45","func_code":"def count_letters(string_):\n counter = 0\n for i in string_:\n counter += 1\n return counter","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":37419,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:41:16","func_code":"def count_letters(n):\n if len(n) == 1:\n return n[0]\n return 1 + count_letters(n[0:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":17334,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-25 12:41:23","func_code":"def power(x, y):\n if y == 0:\n return 1\n return x * power(x, y - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":30090,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-25 12:41:23","func_code":"def power(x, y):\n if y == 0:\n return 1\n return x * power(x, y - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":34972,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-25 12:41:23","func_code":"def power(x, y):\n if y == 0:\n return 1\n return x * power(x, y - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":40072,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:41:46","func_code":"def count_letters(n):\n if len(n) == 1:\n return n[0]\n return 1 + count_letters(n[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":24037,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:41:46","func_code":"def count_letters(n):\n if len(n) == 1:\n return n[0]\n return 1 + count_letters(n[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":18164,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-25 12:41:46","func_code":"def count_letters(n):\n if len(n) == 1:\n return n[0]\n return 1 + count_letters(n[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":7163,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:48:28","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n else:\n return min(a[0], minimum(a[1:]))","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":21912,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:48:28","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n else:\n return min(a[0], minimum(a[1:]))","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":4891,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:54:05","func_code":"def maximum(list):\n if len(list) == 1:\n return list[0]\n else:\n m = maximum(list[1:])\n return m if m > list[0] else list[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":10053,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:54:05","func_code":"def maximum(list):\n if len(list) == 1:\n return list[0]\n else:\n m = maximum(list[1:])\n return m if m > list[0] else list[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":5359,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:56:14","func_code":"def count_letters(s):\n if not s:\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":14805,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 12:56:14","func_code":"def count_letters(s):\n if not s:\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":22202,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 13:01:47","func_code":"def reverse_list(l):\n reversedlist = []\n i = len(l) - 1\n while i > -1:\n reversedlist.append(l[i])\n i = i - 1\n return reversedlist","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":13688,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 13:01:47","func_code":"def reverse_list(l):\n reversedlist = []\n i = len(l) - 1\n while i > -1:\n reversedlist.append(l[i])\n i = i - 1\n return reversedlist","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":22142,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-25 13:01:47","func_code":"def reverse_list(l):\n reversedlist = []\n i = len(l) - 1\n while i > -1:\n reversedlist.append(l[i])\n i = i - 1\n return reversedlist","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":32560,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 13:08:19","func_code":"def reverse_list(l):\n if l == []:\n return []\n tmp = reverse_list(l[1:])\n tmp.append(l[0])\n return tmp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":3506,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 13:08:19","func_code":"def reverse_list(l):\n if l == []:\n return []\n tmp = reverse_list(l[1:])\n tmp.append(l[0])\n return tmp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":29904,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 13:14:38","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":1426,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 13:14:38","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":34011,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 13:21:43","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":30822,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-25 13:21:43","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":2954,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 14:58:14","func_code":"def minimum(a):\n lowest = sum(a)\n for e in a:\n if e < lowest:\n lowest = e\n return lowest","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":34777,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 14:58:14","func_code":"def minimum(a):\n lowest = sum(a)\n for e in a:\n if e < lowest:\n lowest = e\n return lowest","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":33418,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:01:11","func_code":"def maximum(a):\n highest = 0\n for e in a:\n if e > highest:\n highest = e\n return highest","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":17143,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:01:11","func_code":"def maximum(a):\n highest = 0\n for e in a:\n if e > highest:\n highest = e\n return highest","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":28979,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:03:33","func_code":"def count_letters(s):\n l = 0\n for e in s:\n l += 1\n return l","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":15535,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:03:33","func_code":"def count_letters(s):\n l = 0\n for e in s:\n l += 1\n return l","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":41352,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:14:30","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":22628,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:14:30","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":15195,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:14:38","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":17566,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:14:38","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":12844,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:14:54","func_code":"def maximum(s):\n if len(s) == 1:\n return s[0]\n else:\n maxi = maximum(s[1:])\n return s[0] if s[0] > maxi else maxi","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":6413,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:14:54","func_code":"def maximum(s):\n if len(s) == 1:\n return s[0]\n else:\n maxi = maximum(s[1:])\n return s[0] if s[0] > maxi else maxi","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":29191,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:16:10","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":30789,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:16:10","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":17129,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:16:20","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n else:\n return [s[-1]] + reverse_list(s[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":27071,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:16:20","func_code":"def reverse_list(s):\n if len(s) == 0:\n return []\n else:\n return [s[-1]] + reverse_list(s[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":31323,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 15:20:17","func_code":"def power(x, n):\n if x == 0:\n return 1\n return x * power(n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":11050,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 15:20:41","func_code":"def power(x, n):\n if x == 0:\n return 1\n return x * power(x, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":3958,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 15:21:37","func_code":"def power(x, n):\n if n == 0:\n return 1\n return x * power(x, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":13020,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 15:21:37","func_code":"def power(x, n):\n if n == 0:\n return 1\n return x * power(x, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":9743,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:22:39","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":20319,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:22:39","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":13100,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:27:01","func_code":"def power(a, b):\n if b == 1:\n return a\n if b == 0:\n return 1\n return a * power(a, b - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":28520,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:27:01","func_code":"def power(a, b):\n if b == 1:\n return a\n if b == 0:\n return 1\n return a * power(a, b - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":11594,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 15:27:07","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":32107,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 15:27:07","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":26220,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:28:05","func_code":"def selectionsort(m):\n for i in range(len(m)):\n n = i\n for j in range(i, len(m)):\n if m[j] < m[n]:\n n = j\n m[i], m[n] = m[n], m[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":11123,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:28:38","func_code":"def selectionsort(m):\n for i in range(len(m)):\n min_j = i\n for j in range(i, len(m)):\n if m[j] < m[min_j]:\n min_j = j\n m[i], m[min_j] = m[min_j], m[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":20350,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:29:24","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum()","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":14628,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:29:49","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":7325,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:29:49","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":9963,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:29:52","func_code":"def selectionsort(m):\n for i in range(len(m)):\n n = i\n for j in range(i, len(m)):\n if m[j] < m[n]:\n n = j\n m[i], m[n] = m[n], m[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":40807,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:29:52","func_code":"def selectionsort(m):\n for i in range(len(m)):\n n = i\n for j in range(i, len(m)):\n if m[j] < m[n]:\n n = j\n m[i], m[n] = m[n], m[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":34059,"user":"93426de2-87e4-4c00-9910-de51627bd576","date":"2017-04-25 15:29:52","func_code":"def selectionsort(m):\n for i in range(len(m)):\n n = i\n for j in range(i, len(m)):\n if m[j] < m[n]:\n n = j\n m[i], m[n] = m[n], m[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":9702,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:33:16","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":20179,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:33:16","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":22274,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:40:37","func_code":"def count_letters(l):\n letter_sum = 0\n for k in l:\n letter_sum += 1\n return count_letters(l)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":7436,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:42:46","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":27964,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:42:46","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":23415,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:42:52","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":19635,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:42:52","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":24213,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:43:06","func_code":"def minimum(s):\n if len(s) == 1:\n return s[0]\n else:\n min_ret = minimum(s[1:])\n return s[0] if s[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":3952,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:43:06","func_code":"def minimum(s):\n if len(s) == 1:\n return s[0]\n else:\n min_ret = minimum(s[1:])\n return s[0] if s[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":30886,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:43:11","func_code":"def count_letters(l):\n return 1 + count_letters(s[1:]) if l else 0","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":5960,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:43:30","func_code":"def count_letters(l):\n return 1 + count_letters(l[1:]) if l else 0","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":38017,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:43:30","func_code":"def count_letters(l):\n return 1 + count_letters(l[1:]) if l else 0","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":3139,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:46:28","func_code":"def fibonacci(n):\n a, b = 1, 1\n for i in range(n - 1):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":6457,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:47:58","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":40452,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:47:58","func_code":"def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):\n dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5\n return dist < r1 + r2","func_name":"overlap","assignment_id":"overlap","academic_year":2016,"module":"ca117","description":"Test if two circles overlap.","test":"assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True","correct":true} +{"submission_id":4456,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:47:58","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":40957,"user":"61b5b70e-4e9d-424d-ba4b-cab01b8c205f","date":"2017-04-25 15:47:58","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":18431,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:48:14","func_code":"def fibonacci(n):\n a, b = 1, 1\n for i in range(n):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10063,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 15:48:14","func_code":"def fibonacci(n):\n a, b = 1, 1\n for i in range(n):\n a, b = b, a + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23794,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:48:24","func_code":"def reverse_list(l):\n for i in reversed(l):\n return reverse_list(l)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":15883,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 15:49:43","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[-1]:\n return minimum(l[:-1])\n else:\n return minimum(l[1:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":24722,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 15:49:43","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[-1]:\n return minimum(l[:-1])\n else:\n return minimum(l[1:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":17404,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:49:55","func_code":"def reverse_list(l):\n return l.reverse()","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":6287,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:52:21","func_code":"def reverse_list(l):\n return [x for x in reversed(l)]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":185,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:52:21","func_code":"def reverse_list(l):\n return [x for x in reversed(l)]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":10701,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:55:12","func_code":"def fibonacci(a):\n if a == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39385,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:55:33","func_code":"def fibonacci(a):\n if a == 0:\n return 1\n elif a == 1:\n return 1\n return fibonacci(a - 1) + fibonacci(a - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":24972,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:55:33","func_code":"def fibonacci(a):\n if a == 0:\n return 1\n elif a == 1:\n return 1\n return fibonacci(a - 1) + fibonacci(a - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":30777,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-25 15:55:33","func_code":"def fibonacci(a):\n if a == 0:\n return 1\n elif a == 1:\n return 1\n return fibonacci(a - 1) + fibonacci(a - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":27479,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 15:59:46","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[-1]:\n return maximum(l[1:])\n else:\n return maximum(l[:-1])","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":21005,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 15:59:46","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[-1]:\n return maximum(l[1:])\n else:\n return maximum(l[:-1])","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":3172,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 16:03:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":13234,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 16:03:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":41870,"user":"6f8302a0-5974-4b36-a8e9-6b3968a8fce1","date":"2017-04-25 16:03:23","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":3148,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:04:40","func_code":"def power(n, m):\n if m == 1:\n return n\n if m == 0:\n return 1\n return n * power(n, m - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":34571,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:04:40","func_code":"def power(n, m):\n if m == 1:\n return n\n if m == 0:\n return 1\n return n * power(n, m - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":16986,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:06:26","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":25154,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:06:26","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":18210,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:09:35","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n m = minimum(l[1:])\n if m < l[0]:\n return m\n else:\n return l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":14823,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:09:35","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n m = minimum(l[1:])\n if m < l[0]:\n return m\n else:\n return l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":12232,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:10:35","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":36787,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:10:35","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":26031,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:13:28","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n m = maximum(l[1:])\n if m > l[0]:\n return m\n else:\n return l[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":8558,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:13:28","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n m = maximum(l[1:])\n if m > l[0]:\n return m\n else:\n return l[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":7385,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 16:16:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":14494,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 16:16:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":1932,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-25 16:16:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":31571,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:16:58","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":13633,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:16:58","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":37754,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:18:27","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":26373,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:18:27","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":31639,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:20:15","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":2407,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:20:15","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":1887,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:22:23","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":11293,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:22:23","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":20826,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:23:38","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":16497,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:23:38","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":30234,"user":"652b3384-e559-46c5-81db-1bf2117db63b","date":"2017-04-25 16:23:38","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":11116,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:24:45","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":9474,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:24:45","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":35264,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:38:20","func_code":"def power(a, b):\n return a ** b","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":19769,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:38:20","func_code":"def power(a, b):\n return a ** b","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":28105,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:39:57","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":3087,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:39:57","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":28610,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:40:41","func_code":"def minimum(l):\n return min(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":33618,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:40:41","func_code":"def minimum(l):\n return min(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":10667,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:42:29","func_code":"def maximum(l):\n return max(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":21966,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:42:29","func_code":"def maximum(l):\n return max(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":5442,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:44:59","func_code":"def count_letters(a):\n return len(a)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":3860,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:44:59","func_code":"def count_letters(a):\n return len(a)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":11437,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:46:13","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":7081,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:46:13","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":11712,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-25 16:46:13","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":28189,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:51:02","func_code":"def reverse_list(l):\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":42375,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:51:02","func_code":"def reverse_list(l):\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":18783,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:54:49","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":19921,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:54:49","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10654,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:57:12","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":31133,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:57:12","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":35830,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:58:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":662,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:58:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":20231,"user":"fa7e9f17-de07-4868-ab69-667438d7becd","date":"2017-04-25 16:58:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":11559,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 17:17:10","func_code":"def fibonacci(s):\n if s == 0:\n return 0\n if s in (1, 2):\n return 1\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":14658,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 17:18:17","func_code":"def fibonacci(s):\n if s == 0:\n return 0\n if s in (0, 1):\n return 1\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":21047,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 17:18:31","func_code":"def fibonacci(s):\n if s in (0, 1):\n return 1\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":15519,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 17:18:31","func_code":"def fibonacci(s):\n if s in (0, 1):\n return 1\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33917,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 18:40:36","func_code":"def power(n, p):\n if p == 0:\n return 1\n return n ** p","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":26812,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 18:40:36","func_code":"def power(n, p):\n if p == 0:\n return 1\n return n ** p","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":10842,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:47:33","func_code":"def quicksort(array, b, c):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n greater = [i for i in array if i == piv]\n array = less + greater + equal","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":10702,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:47:57","func_code":"def quicksort(array, b, c):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n greater = [i for i in array if i == piv]\n array = greater + equal + less","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":10273,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:49:45","func_code":"def quicksort(array, b, c):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n less = [i for i in array if i == piv]\n quicksort(greater, b, c)\n quicksort(less, b, c)\n array = greater + equal + less","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":1851,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:50:32","func_code":"def quicksort(array, b, c):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n quicksort(greater, b, c)\n quicksort(less, b, c)\n array = greater + equal + less","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":355,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:52:52","func_code":"def quicksort(array, b, c):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n print(less)\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n quicksort(greater, b, c)\n quicksort(less, b, c)\n array = greater + equal + less","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":17609,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:58:58","func_code":"def _quicksort(array):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return quicksort(greater, b, c) + equal + quicksort(less, b, c)\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":16028,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:59:18","func_code":"def _quicksort(array):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return quicksort(greater) + equal + quicksort(less)\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":27986,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 18:59:43","func_code":"def _quicksort(array):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return _quicksort(greater) + equal + _quicksort(less)\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":20683,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:00:15","func_code":"def _quicksort(array):\n less = []\n greater = []\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return _quicksort(greater) + equal + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":15725,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:01:07","func_code":"def _quicksort(array):\n less = []\n greater = []\n print(greater)\n equal = []\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return _quicksort(greater) + equal + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":41673,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:01:27","func_code":"def minimum(l):\n l = sorted(minimum(l))\n return l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":38503,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:01:36","func_code":"def _quicksort(array):\n less = []\n greater = []\n print(greater)\n equal = []\n if len(array) > 0:\n piv = array[0]\n print(piv)\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return _quicksort(greater) + equal + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":11120,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:01:55","func_code":"def minimum(l):\n l = sorted(minimum(l))\n return l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":20159,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:02:06","func_code":"def _quicksort(array):\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n greater = [i for i in array if i > piv]\n equal = [i for i in array if i == piv]\n return _quicksort(greater) + equal + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":35146,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:02:39","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n elif l[0] > l[1]:\n l.remove(l[0])\n else:\n l.remove(l[1])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":30297,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:02:39","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n elif l[0] > l[1]:\n l.remove(l[0])\n else:\n l.remove(l[1])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":8940,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:02:43","func_code":"def _quicksort(array):\n if len(array) > 0:\n piv = array[0]\n less = [i for i in array if i < piv]\n print(less)\n greater = [i for i in array if i >= piv]\n return _quicksort(greater) + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":19086,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:03:26","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n elif l[0] < l[1]:\n l.remove(l[0])\n else:\n l.remove(l[1])\n return minimum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":25763,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:03:44","func_code":"def _quicksort(array):\n if len(array) > 0:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less += i\n else:\n greater += i\n return _quicksort(greater) + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":18668,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:04:08","func_code":"def _quicksort(array):\n if len(array) > 0:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + i\n else:\n greater = greater + i\n return _quicksort(greater) + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":31808,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:04:25","func_code":"def _quicksort(array):\n if len(array) > 0:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + [i]\n else:\n greater = greater + [i]\n return _quicksort(greater) + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":24824,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:04:27","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n elif l[0] < l[1]:\n l.remove(l[0])\n else:\n l.remove(l[1])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":5193,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:04:27","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n elif l[0] < l[1]:\n l.remove(l[0])\n else:\n l.remove(l[1])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":1530,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:05:17","func_code":"def _quicksort(array):\n if len(array) > 0:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + [i]\n else:\n greater = greater + [i]\n print(less)\n return _quicksort(greater) + _quicksort(less)\n else:\n return []\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":19961,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:07:30","func_code":"def _quicksort(array):\n if array <= 1:\n return array\n else:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + [i]\n else:\n greater = greater + [i]\n return _quicksort(greater) + _quicksort(less)\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":32564,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:07:47","func_code":"def _quicksort(array):\n if len(array) <= 1:\n return array\n else:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + [i]\n else:\n greater = greater + [i]\n return _quicksort(greater) + _quicksort(less)\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":1832,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:07:49","func_code":"def count_letters(l):\n return len(l)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":30473,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:08:58","func_code":"def count_letters(l):\n return len(l)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":26108,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:09:04","func_code":"def _quicksort(array):\n if len(array) <= 1:\n return array\n else:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + [i]\n else:\n greater = greater + [i]\n less = _quicksort(less)\n more = _quicksort(more)\n return less + more\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":36541,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:09:35","func_code":"def _quicksort(array):\n if len(array) <= 1:\n return array\n else:\n piv = array[0]\n less = []\n greater = []\n for i in array:\n if i < piv:\n less = less + [i]\n else:\n greater = greater + [i]\n less = _quicksort(less)\n greater = _quicksort(greater)\n return less + greater\n\n\ndef quicksort(array, a, b):\n array = _quicksort(array)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":10019,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:12:51","func_code":"def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return quicksort(less) + [pivot] + quicksort(more)\n\n\ndef quicksort(l, a, b):\n\n def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return quicksort(less) + [pivot] + quicksort(more)\n l = _quicksort(l)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":10292,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-25 19:13:07","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":35990,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-25 19:13:07","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":19887,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-25 19:13:07","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":41513,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:13:12","func_code":"def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n\n\ndef quicksort(l, a, b):\n\n def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n l = _quicksort(l)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":12265,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:13:21","func_code":"def count_letters(l):\n return len(l)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":25271,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:13:21","func_code":"def count_letters(l):\n return len(l)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":2996,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:13:34","func_code":"def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n\n\ndef quicksort(l, a, b):\n\n def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n print(_quicksort(l))","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":35305,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:14:22","func_code":"def reverse_list(l):\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":34905,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:14:22","func_code":"def reverse_list(l):\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":37232,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:15:04","func_code":"def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n\n\ndef quicksort(l, a, b):\n\n def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n l[:] = _quicksort(l)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":9666,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:15:04","func_code":"def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n\n\ndef quicksort(l, a, b):\n\n def _quicksort(array):\n if not array:\n return []\n else:\n pivot = array[0]\n less = [x for x in array if x < pivot]\n more = [x for x in array[1:] if x >= pivot]\n return _quicksort(less) + [pivot] + _quicksort(more)\n l[:] = _quicksort(l)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":21226,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:20:49","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":22968,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:20:49","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":38308,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:33:04","func_code":"def chksorted(a):\n for i in range(len(a) - 1):\n if not a[i] < a[i + 1]:\n return False\n return True\n\n\ndef selectionsort(array):\n\n def chksorted(a):\n for i in range(len(a) - 1):\n if not a[i] < a[i + 1]:\n return False\n return True\n m = min(array)\n mi = array.index(m)\n if not chksorted(array):\n f = array[0]\n array[0] = m\n array[mi] = f","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":16459,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:34:27","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":11597,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:34:27","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":29462,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:34:58","func_code":"def selectionsort(array):\n for i in range(len(arr)):\n for j in range(i, len(arr)):\n if arr[i] > arr[j]:\n arr[i], arr[j] = arr[j], arr[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":27477,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:35:43","func_code":"def selectionsort(array):\n for i in range(len(arr)):\n for j in range(i, len(arr)):\n if arr[i] > arr[j]:\n arr[i], arr[j] = arr[j], arr[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":18874,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:36:22","func_code":"def selectionsort(array):\n for i in range(len(array)):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":9846,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:36:22","func_code":"def selectionsort(array):\n for i in range(len(array)):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":29429,"user":"262b3841-5158-4b0c-be99-57281e73f267","date":"2017-04-25 19:36:22","func_code":"def selectionsort(array):\n for i in range(len(array)):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":22963,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:45:42","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n p = i\n j = i + 1\n while j < len(n):\n if n[j] < n[i]:\n p = j\n j += 1\n tmp = n[p]\n n[p] = n[i]\n n[i] = temp\n i = +1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":42255,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:46:01","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n p = i\n j = i + 1\n while j < len(n):\n if n[j] < n[i]:\n p = j\n j += 1\n tmp = n[p]\n n[p] = n[i]\n n[i] = tmp\n i = +1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":28243,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:47:50","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[i]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = +1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":1654,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 19:53:34","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = +1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":35890,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 20:11:53","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[i]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = +1\n return selectionsort(A)","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":34813,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 20:13:46","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = +1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":17693,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 20:15:18","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":18485,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 20:15:18","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":26492,"user":"2eb2f93d-3491-4b0b-bad9-894c90595058","date":"2017-04-25 20:15:18","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j += 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":20334,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:29:24","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":17683,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:29:24","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":35892,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:33:29","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39803,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:33:29","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":18204,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:35:38","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":13334,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:35:38","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":39455,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:46:01","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q = q + 1\n j = j + 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":20671,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:46:01","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q = q + 1\n j = j + 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":21071,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:50:01","func_code":"def reverse_list(n):\n if len(n) == 1:\n return n\n else:\n return [n[0]] + reverse_list(n[1:])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":19369,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:50:27","func_code":"def reverse_list(n):\n if len(n) == 1:\n return n\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":24275,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:50:48","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":33907,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:50:48","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":35055,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:53:56","func_code":"def count_letters(word):\n if len(word) == 0:\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":17627,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 21:53:56","func_code":"def count_letters(word):\n if len(word) == 0:\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":7855,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:13:24","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":13774,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:13:24","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":21255,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 22:13:48","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":26950,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 22:13:48","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":1472,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 22:19:44","func_code":"def minimum(n):\n n.sort()\n return n[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":663,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 22:19:44","func_code":"def minimum(n):\n n.sort()\n return n[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":40903,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 22:20:23","func_code":"def maximum(n):\n n.sort()\n return n[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":38826,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 22:20:23","func_code":"def maximum(n):\n n.sort()\n return n[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":21704,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-04-25 22:20:23","func_code":"def maximum(n):\n n.sort()\n return n[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":26765,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:37:49","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":41409,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:37:49","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":11948,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 22:40:44","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n return min(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":2256,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 22:45:10","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n return [s for s in l if all(s <= i for i in l)][0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":36155,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 22:45:10","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n return [s for s in l if all(s <= i for i in l)][0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":22893,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 22:46:27","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n return [s for s in l if all(s >= i for i in l)][0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":35751,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 22:46:27","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n return [s for s in l if all(s >= i for i in l)][0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":8631,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:55:44","func_code":"def recursive_selectionsort(A, i):\n if i >= len(a) - 1:\n return\n else:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n recursive_selectionsort(A, i + 1)\n\n\ndef selectionsort(A):\n recursive_selectionsort(A, 0)","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":2229,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:56:31","func_code":"def recursive_selectionsort(A, i):\n if i >= len(a) - 1:\n return\n else:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n recursive_selectionsort(A, i + 1)\n\n\ndef selectionsort(A):\n recursive_selectionsort(A, 0)","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":39994,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 22:58:33","func_code":"def recursive_selectionsort(A, i):\n if i >= len(a) - 1:\n return\n else:\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n recursive_selectionsort(A, i + 1)\n\n\ndef selectionsort(A):\n recursive_selectionsort(A, 0)","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":21126,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 23:01:32","func_code":"def recursive_selectionsort(A, i):\n if i >= len(A) - 1:\n return\n else:\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n recursive_selectionsort(A, i + 1)\n\n\ndef selectionsort(A):\n recursive_selectionsort(A, 0)","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":5146,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 23:01:32","func_code":"def recursive_selectionsort(A, i):\n if i >= len(A) - 1:\n return\n else:\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n recursive_selectionsort(A, i + 1)\n\n\ndef selectionsort(A):\n recursive_selectionsort(A, 0)","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":25353,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-25 23:01:32","func_code":"def recursive_selectionsort(A, i):\n if i >= len(A) - 1:\n return\n else:\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n recursive_selectionsort(A, i + 1)\n\n\ndef selectionsort(A):\n recursive_selectionsort(A, 0)","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":23176,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:02:47","func_code":"def count_letters(s):\n if s == '':\n return 0\n a = 0\n for letter in s:\n a += 1\n return a","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":33890,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:02:47","func_code":"def count_letters(s):\n if s == '':\n return 0\n a = 0\n for letter in s:\n a += 1\n return a","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":9500,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:06:32","func_code":"def reverse_list(l):\n if l == []:\n return none\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":29364,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:07:43","func_code":"def reverse_list(l):\n if l == []:\n return None\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":10086,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:09:24","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":38841,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:09:24","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l[::-1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":40216,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:21:32","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":4215,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:21:32","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":9487,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:45:08","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":2446,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:45:08","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":15105,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-25 23:45:08","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":42143,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 00:00:28","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":11294,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 00:00:28","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":3491,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 00:02:14","func_code":"def selectionsort(a):\n a = a[:]\n out = []\n while a:\n smallest = min(a)\n a.remove(smallest)\n out.append(smallest)\n return out","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":35795,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:05:03","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":27612,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:08:35","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":10800,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:08:35","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":26827,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 00:22:36","func_code":"def selectionsort(a):\n a = a[:]\n out = []\n if a:\n smallest = min(a)\n a.remove(smallest)\n out.append(smallest)\n return out","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":1670,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:32:28","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tmp = minimum(l[1:])\n return tmp if tmp > l[0] else l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":7215,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:32:45","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n tmp = minimum(l[1:])\n return tmp if tmp < l[0] else l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":2643,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:34:09","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m < l[0] else l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":35229,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:34:09","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m < l[0] else l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":12476,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:35:10","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = maximum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":16085,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:35:10","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = maximum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":14487,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 00:36:06","func_code":"def selectionsort(a):\n a = a[:]\n sortedlist = []\n while a:\n smallest = min(a)\n a.remove(smallest)\n sortedlist.append(smallest)\n return sortedlist","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":41571,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 00:44:48","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n timp = a[p]\n a[p] = a[i]\n a[i] = temp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":40013,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:48:33","func_code":"def count_letters(s):\n if s == '':\n return 0\n return count_letters(s[1:]) + 1","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":31241,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:48:33","func_code":"def count_letters(s):\n if s == '':\n return 0\n return count_letters(s[1:]) + 1","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":31842,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:54:17","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":35340,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:55:13","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":11348,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:56:21","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]).append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":711,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:58:24","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l[1:].append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":32660,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:58:53","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l.append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":17286,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:59:09","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":26250,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:59:23","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l[0]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":27681,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:59:43","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l.append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":35230,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 00:59:59","func_code":"def reverse_list(l):\n if l == []:\n return []\n return [1, 2].append(l[0])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":37874,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 01:00:13","func_code":"def swap(A, x, y):\n tmp = A[x]\n A[x] = A[y]\n A[y] = tmp\n\n\ndef selectionsort(a):\n for i in range(len(a)):\n least = i\n for k in range(i + 1, len(a)):\n if a[k] < a[least]:\n least = k\n swap(a, least, i)","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":41794,"user":"a379289f-2b57-4917-ac63-01ab37fb3785","date":"2017-04-26 01:00:13","func_code":"def swap(A, x, y):\n tmp = A[x]\n A[x] = A[y]\n A[y] = tmp\n\n\ndef selectionsort(a):\n for i in range(len(a)):\n least = i\n for k in range(i + 1, len(a)):\n if a[k] < a[least]:\n least = k\n swap(a, least, i)","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":1017,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:01:15","func_code":"def reverse_list(l):\n if l == []:\n return []\n new = reverse_list(l[1:]).append(l[0])\n return new","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":40759,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:01:53","func_code":"def reverse_list(l):\n if l == []:\n return []\n new = l.append(l[0])\n return new","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":14650,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:02:14","func_code":"def reverse_list(l):\n if l == []:\n return []\n new = l[1:]\n return new","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":6915,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:04:28","func_code":"def reverse_list(l):\n if l == []:\n return []\n return l[1:] + l[0]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":15947,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:15:34","func_code":"def reverse_list(l):\n if l == []:\n return []\n return reverse_list(l[1:]) + [l[0]]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":18082,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:16:05","func_code":"def reverse_list(l):\n return reverse_list(l[1:]) + [l[0]] if l else []","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":41116,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:16:05","func_code":"def reverse_list(l):\n return reverse_list(l[1:]) + [l[0]] if l else []","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":34477,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:24:46","func_code":"def fibonacci(n):\n if n < 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":36943,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 01:24:46","func_code":"def fibonacci(n):\n if n < 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":17831,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:08:02","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, q, r):\n if r <= q:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":23929,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:08:47","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= q:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":19523,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:09:21","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":22386,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:11:31","func_code":"def partition(a, p, pivot):\n q = j = p\n while j < pivot:\n if a[j] <= a[pivot]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[pivot] = a[pivot], a[q]\n return q\n\n\ndef quicksort(a, p, pivot):\n if pivot <= p:\n return\n q = partition(a, p, pivot)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, pivot)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":13733,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:13:33","func_code":"def partition(a, start, pivot):\n lower = upper = start\n while upper < pivot:\n if a[upper] <= a[pivot]:\n a[lower], a[upper] = a[upper], a[lower]\n lower += 1\n upper += 1\n a[lower], a[pivot] = a[pivot], a[lower]\n return lower\n\n\ndef quicksort(a, start, pivot):\n if pivot <= start:\n return\n lower = partition(a, start, pivot)\n quicksort(a, start, lower - 1)\n quicksort(a, lower + 1, pivot)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":24629,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:19:20","func_code":"def partition(a, start, pivot):\n lower = upper = start\n while upper < pivot:\n if a[upper] <= a[pivot]:\n a[lower], a[upper] = a[upper], a[lower]\n lower += 1\n upper += 1\n a[lower], a[pivot] = a[pivot], a[lower]\n return lower\n\n\ndef quicksort(a, start, pivot):\n if pivot <= start:\n return\n mid = partition(a, start, pivot)\n quicksort(a, start, mid - 1)\n quicksort(a, mid + 1, pivot)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":35956,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:27:21","func_code":"def partition(a, start, pivot):\n lower = upper = start\n while upper < pivot:\n if a[upper] <= a[pivot]:\n a[lower], a[upper] = a[upper], a[lower]\n lower += 1\n upper += 1\n a[lower], a[pivot] = a[pivot], a[lower]\n return lower\n\n\ndef quicksort(a, start, pivot):\n if pivot <= start:\n return\n mid = partition(a, start, pivot)\n quicksort(a, start, mid - 1)\n quicksort(a, mid + 1, pivot)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":12652,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:27:21","func_code":"def partition(a, start, pivot):\n lower = upper = start\n while upper < pivot:\n if a[upper] <= a[pivot]:\n a[lower], a[upper] = a[upper], a[lower]\n lower += 1\n upper += 1\n a[lower], a[pivot] = a[pivot], a[lower]\n return lower\n\n\ndef quicksort(a, start, pivot):\n if pivot <= start:\n return\n mid = partition(a, start, pivot)\n quicksort(a, start, mid - 1)\n quicksort(a, mid + 1, pivot)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":21574,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:32:54","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n k = 0\n while k < len(a):\n print(a[k])\n k = k + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":29645,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:33:41","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":2512,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:35:36","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[p], a[i] = a[i], a[p]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":32119,"user":"a6392e0c-005c-4131-a7bb-80cf6af877de","date":"2017-04-26 02:35:36","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[p], a[i] = a[i], a[p]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":1945,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-26 02:49:35","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":10131,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-26 02:50:56","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":6863,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-26 02:50:56","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":25722,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-26 02:51:23","func_code":"def sort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = sort(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":16646,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-26 02:51:23","func_code":"def sort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = sort(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":40228,"user":"712c50ed-0c17-44f1-a863-183f2d9a5e14","date":"2017-04-26 02:51:23","func_code":"def sort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = sort(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":39872,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-26 11:24:40","func_code":"def fibonacci(n):\n prev = 0\n cur = 1\n i = 0\n while i < n:\n tmp = cur\n cur = cur + prev\n prev = tmp\n i = i + 1\n return cur","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":32484,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-26 11:24:40","func_code":"def fibonacci(n):\n prev = 0\n cur = 1\n i = 0\n while i < n:\n tmp = cur\n cur = cur + prev\n prev = tmp\n i = i + 1\n return cur","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":30806,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 11:36:58","func_code":"def power(a, b):\n if b == 0:\n return 1\n return a * power(b - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":40611,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 11:37:30","func_code":"def power(a, b):\n if b == 0:\n return 1\n return a * power(a, b - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":31995,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 11:37:30","func_code":"def power(a, b):\n if b == 0:\n return 1\n return a * power(a, b - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":18959,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 11:50:40","func_code":"def minimum(a):\n if a == []:\n return 1\n tmp = a.pop()\n if tmp < minimun(a):\n return tmp","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":17326,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 11:57:08","func_code":"def minimum(a):\n if a.pop() < a[-1]:\n tmp = a.pop()\n if a == []:\n return tmp\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":14121,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 11:57:52","func_code":"def minimum(a):\n if a == []:\n return tmp\n if a.pop() < a[-1]:\n tmp = a.pop()\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":41534,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 11:58:50","func_code":"def minimum(a):\n if a == []:\n return tmp\n if a.pop() < a[-1]:\n print(a[-1])\n tmp = a.pop()\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":42135,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:00:16","func_code":"def minimum(a):\n if a == []:\n return tmp\n if a.pop() < a[-1]:\n print(a.pop())\n tmp = a.pop()\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":23053,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:12:04","func_code":"def minimum(a):\n if a == []:\n return b[0]\n if a[-1] < a[-2]:\n b.append(a[-1])\n if len(b) > 1:\n if b[0] > b[1]:\n b.remove(b[0])\n else:\n b.remove(b[1])\n return minimum(a[:-1])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":9796,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:17:26","func_code":"def minimum(a, flag=True):\n if a == []:\n return tmp\n if flag == True:\n tmp = a.pop()\n print(tmp)\n if a[-1] < tmp:\n tmp = a[-1]\n return minimum(a[:-1], flag=False)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":39331,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-26 12:17:51","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1\n return A","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":11782,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-26 12:17:51","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[p]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1\n return A","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":2651,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-26 12:18:04","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":23041,"user":"88e97329-9c3f-4e1a-8643-1311f4e801a9","date":"2017-04-26 12:18:04","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":20881,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:18:10","func_code":"def minimum(a, flag=True):\n if a == []:\n return tmp\n if flag == True:\n tmp = a.pop()\n if a[-1] < tmp:\n tmp = a[-1]\n return minimum(a[:-1], flag=False)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":29747,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:22:04","func_code":"def minimum(a, flag=True):\n if a == []:\n return tmp\n if flag == True:\n tmp = a.pop()\n if a[-1] < tmp:\n tmp = a[-1]\n return minimum(a[:-1], flag=False)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":30204,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:24:09","func_code":"def minimum(a, tmp=0):\n if a == []:\n return tmp\n if a[-1] < tmp:\n tmp = a[-1]\n return minimum(a[:-1], tmp)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":19844,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:24:42","func_code":"def minimum(a, tmp=0):\n if a == []:\n return tmp\n if tmp == 0 or a[-1] < tmp:\n tmp = a[-1]\n return minimum(a[:-1], tmp)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":1010,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:24:42","func_code":"def minimum(a, tmp=0):\n if a == []:\n return tmp\n if tmp == 0 or a[-1] < tmp:\n tmp = a[-1]\n return minimum(a[:-1], tmp)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":9895,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:25:35","func_code":"def maximum(a, tmp=0):\n if a == []:\n return tmp\n if tmp == 0 or a[-1] > tmp:\n tmp = a[-1]\n return minimum(a[:-1], tmp)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":39231,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:25:53","func_code":"def maximum(a, tmp=0):\n if a == []:\n return tmp\n if tmp == 0 or a[-1] > tmp:\n tmp = a[-1]\n return maximum(a[:-1], tmp)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":36252,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:25:53","func_code":"def maximum(a, tmp=0):\n if a == []:\n return tmp\n if tmp == 0 or a[-1] > tmp:\n tmp = a[-1]\n return maximum(a[:-1], tmp)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":24492,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:28:23","func_code":"def count_letters(a, count=0):\n if len(a) == 0:\n return count\n count += 1\n return count_letters(a - 1, count)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":9557,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:28:45","func_code":"def count_letters(a, count=0):\n if len(a) == 0:\n return count\n count += 1\n return count_letters(a[:-1], count)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":35107,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:31:20","func_code":"def reverse_list(a, b=[]):\n if a == []:\n return b\n b.append(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":31079,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:32:52","func_code":"def reverse_list(a, b=[]):\n if a == []:\n return b\n b.append(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":19334,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:35:23","func_code":"def reverse_list(a, b=[]):\n if a == []:\n tmp = b\n b = []\n return tmp\n b.append(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":5576,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:35:59","func_code":"def count_letters(a, count=0):\n if len(a) == 0:\n return count\n count += 1\n return count_letters(a[:-1], count)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":398,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:35:59","func_code":"def count_letters(a, count=0):\n if len(a) == 0:\n return count\n count += 1\n return count_letters(a[:-1], count)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":25607,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:37:45","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.split('')\n b += ' ' + a[-1]\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":12830,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:38:16","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.split('')\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":11863,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:38:42","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.split(' ')\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":2480,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:39:16","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.split('')\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":6553,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:39:30","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.split(' ')\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":39910,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:39:54","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.strip.split(' ')\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":4358,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:40:25","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.split(' ').strip()\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":1220,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:40:44","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b.strip().split(' ')\n b += ' ' + str(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":15410,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:41:25","func_code":"def reverse_list(a, b=''):\n if a == []:\n return b\n b.append(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":39816,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:41:37","func_code":"def reverse_list(a, b=[]):\n if a == []:\n return b\n b.append(a[-1])\n return reverse_list(a[:-1], b)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":36814,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:44:25","func_code":"def reverse_list(a, b=[], flag=True):\n if flag == True:\n b = []\n if a == []:\n return b\n b.append(a[-1])\n return reverse_list(a[:-1], b, flag=False)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":38577,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:44:25","func_code":"def reverse_list(a, b=[], flag=True):\n if flag == True:\n b = []\n if a == []:\n return b\n b.append(a[-1])\n return reverse_list(a[:-1], b, flag=False)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":10554,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:48:50","func_code":"def fibonacci(a):\n if a == 0:\n return 0\n return 1 + fibonacci(a - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":25853,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:49:08","func_code":"def fibonacci(a):\n if a == 0:\n return 1\n return 1 + fibonacci(a - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":36655,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 12:50:25","func_code":"def fibonacci(a, curr=1):\n if a == 0:\n return curr\n return curr + fibonacci(a - 1, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10394,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 12:52:09","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return power(m, n - 1) * m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":33231,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 12:52:33","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return power(m, n - 1) * m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":10586,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 12:52:33","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return power(m, n - 1) * m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":26196,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:00:12","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return 0\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":1581,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 13:00:21","func_code":"def minimum(mylist):\n if len(mylist) == 1:\n return mylist[0]\n if mylist[0] > mylist[1]:\n mylist.remove(mylist[0])\n return minimum(mylist)\n else:\n mylist.remove(mylist[1])\n return minimum(mylist)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":4613,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 13:00:21","func_code":"def minimum(mylist):\n if len(mylist) == 1:\n return mylist[0]\n if mylist[0] > mylist[1]:\n mylist.remove(mylist[0])\n return minimum(mylist)\n else:\n mylist.remove(mylist[1])\n return minimum(mylist)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":10014,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:01:04","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m < l[0] else l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":6543,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:01:04","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m < l[0] else l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":10122,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:01:08","func_code":"def fibonacci(a, prev=0, curr=1):\n if a == 0:\n return 1\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":38858,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:01:40","func_code":"def fibonacci(a, prev=0, curr=1):\n if a == 0:\n return 0\n prev = curr\n return 1 + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":24920,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 13:01:59","func_code":"def maximum(mylist):\n if len(mylist) == 1:\n return mylist[0]\n if mylist[0] < mylist[1]:\n mylist.remove(mylist[0])\n return minimum(mylist)\n else:\n mylist.remove(mylist[1])\n return minimum(mylist)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":150,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:02:05","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":39421,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:02:07","func_code":"def fibonacci(a, prev=0, curr=1):\n if a == 0:\n return 1\n prev = curr\n return 1 + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":22073,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:02:18","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":18777,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:02:20","func_code":"def fibonacci(a, prev=0, curr=1):\n if a == 0:\n return prev\n prev = curr\n return 1 + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":15042,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:02:26","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = minimum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":11266,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:02:35","func_code":"def fibonacci(a, prev=0, curr=1):\n if a == 0:\n return prev\n prev = curr\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":42228,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:03:09","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = maximum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":42148,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:03:09","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n m = maximum(l[1:])\n return m if m > l[0] else l[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":24206,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:03:20","func_code":"def fibonacci(a, prev=0, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += tmp\n prev = curr\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":1296,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:04:04","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += tmp\n prev = curr\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":32257,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:04:40","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += pev\n prev = curr\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39870,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:04:49","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += prev\n prev = curr\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":6400,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:05:45","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += prev\n prev = tmp\n return prev + fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":24326,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:06:52","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += prev\n prev = tmp\n return fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39250,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:06:52","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += prev\n prev = tmp\n return fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":9408,"user":"a48376ed-7138-4481-a4da-74490838ea3e","date":"2017-04-26 13:06:52","func_code":"def fibonacci(a, prev=1, curr=1):\n if a == 0:\n return prev\n tmp = curr\n curr += prev\n prev = tmp\n return fibonacci(a - 1, prev, curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":12781,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 13:09:09","func_code":"def maximum(mylist):\n if len(mylist) == 1:\n return mylist[0]\n if mylist[0] < mylist[1]:\n mylist.remove(mylist[0])\n return maximum(mylist)\n else:\n mylist.remove(mylist[1])\n return maximum(mylist)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":37467,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 13:09:09","func_code":"def maximum(mylist):\n if len(mylist) == 1:\n return mylist[0]\n if mylist[0] < mylist[1]:\n mylist.remove(mylist[0])\n return maximum(mylist)\n else:\n mylist.remove(mylist[1])\n return maximum(mylist)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":25111,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:10:03","func_code":"def count_letters(word):\n if not word:\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":14683,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:10:16","func_code":"def count_letters(word):\n if not word:\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":25042,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:10:16","func_code":"def count_letters(word):\n if not word:\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":40823,"user":"bd03ecd6-cea3-4854-803a-b14d429489a7","date":"2017-04-26 13:10:16","func_code":"def count_letters(word):\n if not word:\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":36561,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 13:11:31","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[-2] > a[-1]:\n a[-2], a[-1] = a[-1], a[-2]\n a.pop()\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":326,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 13:12:02","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[-2] > a[-1]:\n a[-2], a[-1] = a[-1], a[-2]\n a.pop()\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":25265,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 13:12:02","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[-2] > a[-1]:\n a[-2], a[-1] = a[-1], a[-2]\n a.pop()\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":10031,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 13:13:00","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[-2] < a[-1]:\n a[-2], a[-1] = a[-1], a[-2]\n a.pop()\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":17364,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 13:13:00","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[-2] < a[-1]:\n a[-2], a[-1] = a[-1], a[-2]\n a.pop()\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":25846,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 13:13:34","func_code":"def power(a, b):\n if b == 0:\n return 1\n return a * power(a, b - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":18794,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 13:13:34","func_code":"def power(a, b):\n if b == 0:\n return 1\n return a * power(a, b - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":25109,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 13:51:50","func_code":"def count_letters(word, count=0):\n if word == '':\n return count\n else:\n word = word[1:]\n return count_letters(word, count + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":31131,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 13:51:50","func_code":"def count_letters(word, count=0):\n if word == '':\n return count\n else:\n word = word[1:]\n return count_letters(word, count + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":36361,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:53:02","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":1959,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:53:02","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":31529,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 13:56:44","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":26147,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 13:56:44","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":11687,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:57:14","func_code":"def reverse_list(n):\n if n == 1:\n return 0\n else:\n return reverse_list(n - 1)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":13589,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:58:33","func_code":"def reverse_list(n):\n if n == 1:\n return 0\n else:\n return reverse_list(n[-1:])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":30193,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:58:52","func_code":"def reverse_list(n):\n if n == 1:\n return 0\n else:\n return reverse_list(n)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":7857,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:59:14","func_code":"def reverse_list(n):\n if n == 1:\n return 0\n else:\n return reverse_list(n - 1)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":40030,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 13:59:50","func_code":"def reverse_list(n=[]):\n if len(n) == 1:\n return 0\n else:\n return reverse_list(n - 1)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":164,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 14:00:05","func_code":"def reverse_list(n=[]):\n if len(n) == 1:\n return 0\n else:\n return reverse_list(n)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":9495,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 14:02:54","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":37907,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 14:02:54","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":719,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-26 14:02:54","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":38540,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 14:06:28","func_code":"def count_letters(s, i=0):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":27689,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 14:06:28","func_code":"def count_letters(s, i=0):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":12792,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-26 14:10:52","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n else:\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":12559,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-26 14:10:52","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n else:\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":24421,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 14:12:28","func_code":"def count_letters(word):\n if word == '':\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":36440,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 14:12:28","func_code":"def count_letters(word):\n if word == '':\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":26130,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-26 14:12:28","func_code":"def count_letters(word):\n if word == '':\n return 0\n else:\n return 1 + count_letters(word[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":4599,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-26 14:16:22","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":21026,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-26 14:16:22","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":28591,"user":"6668ebd6-a850-4666-b8cc-5c934a67601a","date":"2017-04-26 14:16:22","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":1506,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 14:34:31","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n p = i\n j = i + 1\n while j < len(n):\n if n[j] < n[p]:\n p = j\n j = j + 1\n temp = n[p]\n n[p] = n[i]\n n[i] = temp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":15001,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 14:34:31","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n p = i\n j = i + 1\n while j < len(n):\n if n[j] < n[p]:\n p = j\n j = j + 1\n temp = n[p]\n n[p] = n[i]\n n[i] = temp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":2756,"user":"3d19e1db-d496-420c-b077-41631364e4f7","date":"2017-04-26 14:34:31","func_code":"def selectionsort(n):\n i = 0\n while i < len(n):\n p = i\n j = i + 1\n while j < len(n):\n if n[j] < n[p]:\n p = j\n j = j + 1\n temp = n[p]\n n[p] = n[i]\n n[i] = temp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":24604,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 14:37:23","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33134,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 14:37:23","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":27709,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 14:48:53","func_code":"def fibonacci(n, first_number=0, second_number=1, counter=0):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n elif n == counter:\n return second_number\n else:\n holder = second_number\n second_number += first_number\n first_number = holder\n return fibonacci(n, first_number, second_number, counter + 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":178,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 14:49:28","func_code":"def fibonacci(n, first_number=0, second_number=1, counter=0):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n elif n == counter:\n return second_number\n else:\n holder = second_number\n second_number += first_number\n first_number = holder\n return fibonacci(n, first_number, second_number, counter + 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":13056,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 14:50:32","func_code":"def fibonacci(n, first_number=0, second_number=1, counter=0):\n if n == 0:\n print('HEYA')\n return 0\n elif n == 1:\n return 1\n elif n == counter:\n return second_number\n else:\n holder = second_number\n second_number += first_number\n first_number = holder\n return fibonacci(n, first_number, second_number, counter + 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":38310,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 14:51:26","func_code":"def fibonacci(n, first_number=0, second_number=1, counter=0):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n elif n == counter:\n return second_number\n else:\n holder = second_number\n second_number += first_number\n first_number = holder\n return fibonacci(n, first_number, second_number, counter + 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39579,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 14:51:26","func_code":"def fibonacci(n, first_number=0, second_number=1, counter=0):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n elif n == counter:\n return second_number\n else:\n holder = second_number\n second_number += first_number\n first_number = holder\n return fibonacci(n, first_number, second_number, counter + 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23598,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 15:02:38","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":13749,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 15:03:03","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":41735,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 15:03:03","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":13692,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:11:20","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":28120,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:11:20","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":17873,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:12:26","func_code":"def power(n, m):\n if m == 1:\n return n\n if m == 0:\n return 1\n return n * power(n, m - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":38278,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:12:26","func_code":"def power(n, m):\n if m == 1:\n return n\n if m == 0:\n return 1\n return n * power(n, m - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":3730,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:14:32","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":26713,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:14:32","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":39322,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:16:51","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":9187,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:16:51","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":30016,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-26 15:16:51","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26112,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 15:17:36","func_code":"def reverse_list(a):\n if a == []:\n return a\n return reverse_list(a[1:]) + [a[0]]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":23703,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 15:17:36","func_code":"def reverse_list(a):\n if a == []:\n return a\n return reverse_list(a[1:]) + [a[0]]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":27927,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-26 15:17:36","func_code":"def reverse_list(a):\n if a == []:\n return a\n return reverse_list(a[1:]) + [a[0]]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":285,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 15:17:59","func_code":"def selectionsort(array):\n for i in range(len(array)):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":4971,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 15:17:59","func_code":"def selectionsort(array):\n for i in range(len(array)):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":1306,"user":"e36ebdf2-7cd7-440f-af8b-386d6e2d920f","date":"2017-04-26 15:17:59","func_code":"def selectionsort(array):\n for i in range(len(array)):\n for j in range(i, len(array)):\n if array[i] > array[j]:\n array[i], array[j] = array[j], array[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":27055,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:26:10","func_code":"def power(n, m):\n if m == 1:\n return n\n if m == 0:\n return 1\n return n * (n, m - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":37152,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:26:26","func_code":"def power(n, m):\n if m == 1:\n return n\n if m == 0:\n return 1\n return n * power(n, m - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":30159,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:26:26","func_code":"def power(n, m):\n if m == 1:\n return n\n if m == 0:\n return 1\n return n * power(n, m - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":25008,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:29:59","func_code":"def minimum(lst):\n if len(lst) == 1:\n return lst[0]\n if lst[0] < lst[1]:\n lst.remove(lst[1])\n else:\n lst.remove(lst[0])\n return minimum(lst)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":18829,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:29:59","func_code":"def minimum(lst):\n if len(lst) == 1:\n return lst[0]\n if lst[0] < lst[1]:\n lst.remove(lst[1])\n else:\n lst.remove(lst[0])\n return minimum(lst)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":29672,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:42:00","func_code":"def maximum(lst):\n if len(lst) == 1:\n return lst[0]\n if lst[0] > lst[1]:\n lst.remove(lst[q])\n else:\n lst.remove(lst[0])\n return maximum(lst)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":6664,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:42:20","func_code":"def maximum(lst):\n if len(lst) == 1:\n return lst[0]\n if lst[0] > lst[1]:\n lst.remove(lst[0])\n else:\n lst.remove(lst[0])\n return maximum(lst)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":18416,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:43:04","func_code":"def maximum(lst):\n if len(lst) == 1:\n return lst[0]\n if lst[0] > lst[1]:\n lst.remove(lst[1])\n else:\n lst.remove(lst[0])\n return maximum(lst)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":26121,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 15:43:04","func_code":"def maximum(lst):\n if len(lst) == 1:\n return lst[0]\n if lst[0] > lst[1]:\n lst.remove(lst[1])\n else:\n lst.remove(lst[0])\n return maximum(lst)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":26919,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 16:38:12","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":18531,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 16:38:12","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":8083,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 16:38:58","func_code":"def reverse_list(lst):\n l = lst[::-1]\n return l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":5529,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-26 16:38:58","func_code":"def reverse_list(lst):\n l = lst[::-1]\n return l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":37980,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 17:01:17","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":36133,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 17:01:17","func_code":"def count_letters(s):\n if s == '':\n return 0\n return 1 + count_letters(s[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":4384,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:02:36","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n a = l[1]\n return reverse_list(l[1:]).append(a)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":22442,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:02:59","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n a = l[0]\n return reverse_list(l[1:]).append(a)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":41742,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:06:52","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":4497,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:06:52","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":10781,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:36:19","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":9613,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:42:08","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":14517,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:42:08","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":6397,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:42:12","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n return minimum(l[1:])\n else:\n return minimum(l[0] + l[2:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":11315,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:42:36","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n return minimum(l[1:])\n else:\n return minimum([l[0]] + l[2:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":7475,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:42:36","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n return minimum(l[1:])\n else:\n return minimum([l[0]] + l[2:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":41554,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:48:15","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n return maximum(l[1:])\n else:\n return maximum([l[0]] + l[2:])","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":38255,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 18:48:15","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n return maximum(l[1:])\n else:\n return maximum([l[0]] + l[2:])","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":20079,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 19:00:05","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[i], a[p] = a[p], a[i]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":33640,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 19:00:17","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[i], a[p] = a[p], a[i]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":17296,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 19:00:17","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[i], a[p] = a[p], a[i]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":33214,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:07:58","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":37063,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:07:58","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33492,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:09:44","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":14163,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:09:44","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":40240,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:12:28","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":14,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:12:28","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":8222,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:14:23","func_code":"def power(n, p):\n if p == 0:\n return 1\n else:\n return power(n, p - 1) * n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":41580,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:14:23","func_code":"def power(n, p):\n if p == 0:\n return 1\n else:\n return power(n, p - 1) * n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":5808,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:15:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":41338,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:15:27","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":34644,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:19:28","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":5426,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:19:28","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":32882,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:23:24","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":681,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:23:24","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":17503,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:25:06","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":4164,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:25:06","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":14748,"user":"794362b7-cbcd-4bea-bafb-7967c266e248","date":"2017-04-26 19:25:06","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":41776,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 19:35:53","func_code":"def partition(a, start, end):\n j = q = start\n while j < end:\n if a[j] < a[end]:\n a[j], a[q] = a[q], a[j]\n q += 1\n j += 1\n a[end], a[q] = a[q], a[end]\n return q\n\n\ndef quicksort(a, start, end):\n if end <= start:\n return\n q = partition(a, start, end)\n quicksort(a, start, q - 1)\n quicksort(a, q + 1, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":32668,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 19:35:53","func_code":"def partition(a, start, end):\n j = q = start\n while j < end:\n if a[j] < a[end]:\n a[j], a[q] = a[q], a[j]\n q += 1\n j += 1\n a[end], a[q] = a[q], a[end]\n return q\n\n\ndef quicksort(a, start, end):\n if end <= start:\n return\n q = partition(a, start, end)\n quicksort(a, start, q - 1)\n quicksort(a, q + 1, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":41217,"user":"431d0ef6-9edd-464b-a5fa-cccf8b152f4e","date":"2017-04-26 19:35:53","func_code":"def partition(a, start, end):\n j = q = start\n while j < end:\n if a[j] < a[end]:\n a[j], a[q] = a[q], a[j]\n q += 1\n j += 1\n a[end], a[q] = a[q], a[end]\n return q\n\n\ndef quicksort(a, start, end):\n if end <= start:\n return\n q = partition(a, start, end)\n quicksort(a, start, q - 1)\n quicksort(a, q + 1, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":28362,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:15:26","func_code":"def power(m, n):\n if n == 1:\n return m\n if n == 0:\n return 1\n return n * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":27276,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:17:45","func_code":"def power(m, n):\n if n == 1:\n return m\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":21720,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:17:45","func_code":"def power(m, n):\n if n == 1:\n return m\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":29047,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:23:48","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n if n[0] < n[1]:\n n.remove(n[1])\n else:\n n.remove(n[0])\n return minimum(n)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":27140,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:23:48","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n if n[0] < n[1]:\n n.remove(n[1])\n else:\n n.remove(n[0])\n return minimum(n)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":12175,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:29:37","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n if n[0] > n[1]:\n n.remove(n[1])\n else:\n n.remove(n[0])\n return maximum(n)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":32880,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:29:37","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n if n[0] > n[1]:\n n.remove(n[1])\n else:\n n.remove(n[0])\n return maximum(n)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":28826,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:38:19","func_code":"def count_letters(s):\n if len(s) == 0:\n return 0\n s = list(s)\n s.remove(s[0])\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":30570,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:38:19","func_code":"def count_letters(s):\n if len(s) == 0:\n return 0\n s = list(s)\n s.remove(s[0])\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":41232,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 20:40:31","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n a = l[-1]\n a.pop()\n return [a] + reverse_list(l)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":14485,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 21:48:57","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n a = l[-1]\n l.pop()\n return [a] + reverse_list(l)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":24150,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 21:48:57","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n a = l[-1]\n l.pop()\n return [a] + reverse_list(l)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":19261,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:10:56","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26535,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:10:56","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":32143,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:30:28","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":14458,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:30:28","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":14852,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:33:08","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":30810,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:33:08","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":29352,"user":"7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465","date":"2017-04-26 22:33:08","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":33392,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 10:25:49","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":39628,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 10:25:49","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":35416,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 10:31:20","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n if n[0] < n[1]:\n n.remove(n[1])\n return minimum(n)\n else:\n n.remove(n[0])\n return minimum(n)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":6624,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 10:31:20","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n if n[0] < n[1]:\n n.remove(n[1])\n return minimum(n)\n else:\n n.remove(n[0])\n return minimum(n)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":19796,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 10:33:05","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n if n[0] > n[1]:\n n.remove(n[1])\n return maximum(n)\n else:\n n.remove(n[0])\n return maximum(n)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":615,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 10:33:05","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n if n[0] > n[1]:\n n.remove(n[1])\n return maximum(n)\n else:\n n.remove(n[0])\n return maximum(n)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":20287,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:21:26","func_code":"def power(n, p):\n if p == 0:\n return 1\n else:\n return power(n, p - 1) * n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":39189,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:21:26","func_code":"def power(n, p):\n if p == 0:\n return 1\n else:\n return power(n, p - 1) * n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":17138,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:24:22","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":23080,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:24:22","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":29689,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:29:09","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":9535,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:29:09","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":20018,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:33:47","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":9125,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:33:47","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":20499,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 12:34:39","func_code":"def fibonacci(h):\n if h == 0 or h == 1:\n return 1\n return fibonacci(h - 1) + fibonacci(h - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":19074,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 12:34:39","func_code":"def fibonacci(h):\n if h == 0 or h == 1:\n return 1\n return fibonacci(h - 1) + fibonacci(h - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":18737,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:36:41","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":31184,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:36:41","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":8634,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:39:09","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":38963,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:39:09","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":40399,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:44:20","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":552,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:44:20","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":41743,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:47:49","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":32180,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:50:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":5523,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:50:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":35391,"user":"4e44ac28-c84a-43ee-9b95-c4270d7bb030","date":"2017-04-27 12:50:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":32267,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:00:19","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":27279,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:01:59","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":33727,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:01:59","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":998,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:11:40","func_code":"def selectionsort(A, p, r):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":6232,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:12:36","func_code":"def selectionsort(A):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":8228,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:16:08","func_code":"def selectionsort(A):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":403,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:17:52","func_code":"def selectionsort(A):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":28201,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:18:10","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":42181,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:18:10","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":28180,"user":"4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7","date":"2017-04-27 13:18:10","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":15952,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 14:00:08","func_code":"def power(a, b):\n if b == 0:\n return 1\n else:\n return power(a, b - 1) * a","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":11538,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 14:00:08","func_code":"def power(a, b):\n if b == 0:\n return 1\n else:\n return power(a, b - 1) * a","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":31291,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 14:01:57","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":41586,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 14:01:57","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":14685,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 14:02:48","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":2862,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 14:02:48","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":28166,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:18:48","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":33318,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:19:24","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":29371,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:19:24","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":24883,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:36:13","func_code":"def minimum(l):\n if l == []:\n return []\n temp = minimum(l[1:])\n if len(temp) == 0 or l[0] > temp[0]:\n temp = [l[0]]\n return temp[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":33669,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:36:44","func_code":"def minimum(l):\n if l == []:\n return []\n temp = minimum(l[1:])\n if len(temp) == 0 or l[0] > temp[0]:\n temp = [l[0]]\n return temp[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":25173,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:37:10","func_code":"def minimum(l):\n if l == []:\n return []\n temp = minimum(l[1:])\n print(temp)\n if len(temp) == 0 or l[0] > temp[0]:\n temp = [l[0]]\n return temp[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":2277,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:37:41","func_code":"def minimum(l):\n if l == []:\n return []\n temp = minimum(l[1:])\n if l[0] > temp[0]:\n temp = [l[0]]\n return temp[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":26741,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:46:17","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n\ndef partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef minimum(l):\n\n def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n return quicksort(l, 0, len(l) - 1)[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":30047,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:46:51","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n\ndef partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef minimum(l):\n\n def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n quicksort(l, 0, len(l) - 1)\n return l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":39622,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:46:51","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n\ndef partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef minimum(l):\n\n def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n quicksort(l, 0, len(l) - 1)\n return l[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":5635,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:48:05","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n\ndef partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef maximum(l):\n\n def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n quicksort(l, 0, len(l) - 1)\n return l[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":12768,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 14:48:05","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n\ndef partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef maximum(l):\n\n def quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n quicksort(l, 0, len(l) - 1)\n return l[-1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":1651,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:02:21","func_code":"def selectionsort(a):\n j = 0\n i = 1\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":14784,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:03:57","func_code":"def count_letters(s):\n if s == '':\n return 0\n s = s[1:]\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":12729,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:03:57","func_code":"def count_letters(s):\n if s == '':\n return 0\n s = s[1:]\n return 1 + count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":7463,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:06:06","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p, j = i, i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":38342,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:06:06","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p, j = i, i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":29108,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-27 15:06:48","func_code":"def partition(A, p, r):\n q = j = p\n while j > r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j > r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":27705,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:06:53","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":20942,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:07:10","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":29945,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:07:10","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":25552,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-27 15:07:54","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":19597,"user":"05f63619-1095-4d15-8436-1f0832a593bc","date":"2017-04-27 15:07:54","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":17288,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:18:21","func_code":"def minimum(a, minimum=None):\n if not a:\n return minimum\n test = a.pop()\n if test < minimum or minimum == None:\n return minimum(a, test)\n else:\n return minimum(a, minimum)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":24455,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:18:57","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":22217,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:18:57","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n if n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":38170,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:19:08","func_code":"def minimum(a, minimum=0):\n if not a:\n return minimum\n test = a.pop()\n if test < minimum or minimum == 0:\n return minimum(a, test)\n else:\n return minimum(a, minimum)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":4657,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:20:28","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":40388,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:20:28","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":31861,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:21:34","func_code":"def minimum(a, minimum=0):\n if not a:\n return minimum\n test = a.pop()\n if test < minimum or minimum == 0:\n return minimum(a, test)\n return minimum(a, minimum)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":22001,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:21:58","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":16350,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:21:58","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":644,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:22:01","func_code":"def minimum(a, minimum=0):\n if not a:\n return minimum\n test = int(a.pop())\n if test < minimum or minimum == 0:\n return minimum(a, test)\n return minimum(a, minimum)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":35362,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:22:50","func_code":"def minimum(a, minimum=0):\n if not a:\n return minimum\n test = str(a.pop())\n if int(test) < int(minimum) or int(minimum) == 0:\n return minimum(a, int(test))\n return minimum(a, int(minimum))","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":16831,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:23:10","func_code":"def minimum(a, minimum=0):\n if not a:\n return minimum\n test = str(a.pop())\n if int(test) < int(minimum) or int(minimum) == 0:\n return minimum(a, test)\n return minimum(a, minimum)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":23693,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:23:40","func_code":"def selectionsort(l):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return l","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":20432,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:24:21","func_code":"def minimum(a, mini=0):\n if not a:\n return mini\n test = a.pop()\n if test < mini or mini == 0:\n return minimum(a, test)\n return minimum(a, mini)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":2483,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:24:21","func_code":"def minimum(a, mini=0):\n if not a:\n return mini\n test = a.pop()\n if test < mini or mini == 0:\n return minimum(a, test)\n return minimum(a, mini)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":9058,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:25:55","func_code":"def maximum(a, high=0):\n if not a:\n return high\n test = a.pop()\n if test > high or high == 0:\n return maximum(a, test)\n return maximum(a, high)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":26982,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 15:25:55","func_code":"def maximum(a, high=0):\n if not a:\n return high\n test = a.pop()\n if test > high or high == 0:\n return maximum(a, test)\n return maximum(a, high)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":13122,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:27:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":9701,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:27:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":18154,"user":"c0a5d565-4fbf-4274-85af-71162f38b8d4","date":"2017-04-27 15:27:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":29384,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:31:33","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n else:\n minimum_ret = minimum(n[1:])\n return n[0] if n[0] < minimum_ret else minimum_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":15513,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:31:33","func_code":"def minimum(n):\n if len(n) == 1:\n return n[0]\n else:\n minimum_ret = minimum(n[1:])\n return n[0] if n[0] < minimum_ret else minimum_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":5049,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:37:15","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n else:\n maxim = maximum(n[1:])\n return n[0] if n[0] > maxim else maxim","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":11902,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:37:15","func_code":"def maximum(n):\n if len(n) == 1:\n return n[0]\n else:\n maxim = maximum(n[1:])\n return n[0] if n[0] > maxim else maxim","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":21989,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 15:39:22","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":38397,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 15:39:22","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":38563,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:40:00","func_code":"def count_letters(n):\n if n == '':\n return 0\n else:\n return 1 + count_letters(n[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":30019,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:46:28","func_code":"def count_letters(n):\n if n == '':\n return 0\n else:\n return 1 + count_letters(n[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":10669,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:46:28","func_code":"def count_letters(n):\n if n == '':\n return 0\n else:\n return 1 + count_letters(n[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":15639,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:50:42","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":11555,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:50:42","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":21431,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:56:39","func_code":"def fibonacci(i):\n if i <= 1:\n return 1\n else:\n return fibonacci(i - 1) + fibonacci(i - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":6456,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 15:56:39","func_code":"def fibonacci(i):\n if i <= 1:\n return 1\n else:\n return fibonacci(i - 1) + fibonacci(i - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":27982,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 16:03:33","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":2518,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 16:03:33","func_code":"def quicksort(l, beg, fin):\n if fin - beg < 1:\n return\n i = j = beg\n while i <= fin:\n if l[i] <= l[fin]:\n l[i], l[j] = l[j], l[i]\n j += 1\n i += 1\n quicksort(l, beg, j - 2)\n quicksort(l, j, fin)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":1207,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:03:51","func_code":"def quicksort(a, start, end):\n if end - start < 1:\n return\n i = k = start\n while i <= end:\n if a[i] <= a[end]:\n a[i], a[k] = a[k], a[i]\n k = k + 1\n i = i + 1","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":17669,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:04:51","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":7318,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:04:51","func_code":"def reverse_list(n):\n if len(n) == 0:\n return []\n else:\n return [n[-1]] + reverse_list(n[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":4653,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:04:52","func_code":"def quicksort(a, start, end):\n if end - start < 1:\n return\n i = k = start\n while i <= end:\n if a[i] <= a[end]:\n a[i], a[k] = a[k], a[i]\n k = k + 1\n i = i + 1\n quicksort(a, start, k - 2)\n quicksort(a, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":34786,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:05:08","func_code":"def quicksort(a, start, end):\n if end - start < 1:\n return\n i = k = start\n while i <= end:\n if a[i] <= a[end]:\n a[i], a[k] = a[k], a[i]\n k = k + 1\n i = i + 1\n quicksort(a, start, k - 2)\n quicksort(a, k, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":42186,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:05:08","func_code":"def quicksort(a, start, end):\n if end - start < 1:\n return\n i = k = start\n while i <= end:\n if a[i] <= a[end]:\n a[i], a[k] = a[k], a[i]\n k = k + 1\n i = i + 1\n quicksort(a, start, k - 2)\n quicksort(a, k, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":6938,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:07:24","func_code":"def count_letters(n):\n if n == '':\n return 0\n else:\n return count_letters(n[1:]) + 1","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":34057,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:07:24","func_code":"def count_letters(n):\n if n == '':\n return 0\n else:\n return count_letters(n[1:]) + 1","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":37363,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:08:43","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = ij = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":22456,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:09:31","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":17541,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:09:31","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":25910,"user":"477d4ab3-7007-4ba6-b1ff-797966495e9d","date":"2017-04-27 16:09:31","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":10852,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:09:58","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n else:\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":12455,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:09:58","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n else:\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":508,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:13:25","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q = q + 1\n j = j + 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q = q + 1\n j = j + 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":25249,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:13:25","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q = q + 1\n j = j + 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q = q + 1\n j = j + 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":7203,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 16:15:14","func_code":"def selectionsort(A):\n for h in range(len(A)):\n min_i = h\n for i in range(h, len(A)):\n if A[i] < A[min_i]:\n min_i = i\n A[h], A[min_i] = A[min_i], A[h]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":2421,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 16:15:14","func_code":"def selectionsort(A):\n for h in range(len(A)):\n min_i = h\n for i in range(h, len(A)):\n if A[i] < A[min_i]:\n min_i = i\n A[h], A[min_i] = A[min_i], A[h]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":16641,"user":"f6343d5f-9ee0-441c-a67c-781ee180947e","date":"2017-04-27 16:15:14","func_code":"def selectionsort(A):\n for h in range(len(A)):\n min_i = h\n for i in range(h, len(A)):\n if A[i] < A[min_i]:\n min_i = i\n A[h], A[min_i] = A[min_i], A[h]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":19898,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:17:31","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] < A[i]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":21744,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:20:22","func_code":"def selectionsort(A):\n i = 0\n while i < len(A):\n p = i\n j = i + 1\n while j < len(A):\n if A[j] > A[i]:\n p = j\n j = j + 1\n tmp = A[p]\n A[p] = A[i]\n A[i] = tmp\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":2340,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:23:42","func_code":"def selectionsort(A):\n for h in range(len(A)):\n mini = h\n for i in range(h, len(A)):\n if A[i] < A[mini]:\n mini = i\n A[h], A[mini] = A[mini], A[h]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":40768,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:23:42","func_code":"def selectionsort(A):\n for h in range(len(A)):\n mini = h\n for i in range(h, len(A)):\n if A[i] < A[mini]:\n mini = i\n A[h], A[mini] = A[mini], A[h]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":10298,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-04-27 16:23:42","func_code":"def selectionsort(A):\n for h in range(len(A)):\n mini = h\n for i in range(h, len(A)):\n if A[i] < A[mini]:\n mini = i\n A[h], A[mini] = A[mini], A[h]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":14322,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:39:15","func_code":"def fibonacci(n):\n if n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":13038,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:39:58","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":25205,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:40:28","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":5040,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:40:28","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":29044,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:44:06","func_code":"def parition(a, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n else:\n q = parition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":20344,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:44:43","func_code":"def parition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n else:\n q = parition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":42388,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:45:56","func_code":"def parition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n else:\n q = parition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":3485,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:45:56","func_code":"def parition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n else:\n q = parition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":37924,"user":"59b507a0-b0a2-42b7-a6af-736ab71c8fe1","date":"2017-04-27 16:45:56","func_code":"def parition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n else:\n q = parition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":26680,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-04-27 16:46:56","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":12730,"user":"17658437-97b1-4a8a-ac6f-a63a54536e33","date":"2017-04-27 16:46:56","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n\n def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":1703,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:47:00","func_code":"def search(str, letter):\n if str[i] == '':\n return False\n elif str[0] == letter:\n return True\n else:\n search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":39062,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:47:00","func_code":"def fibonacci(n):\n if n == n - 1 + (n - 2):\n return n\n else:\n fibonacci(n + 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":18297,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:47:00","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":24372,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:47:00","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8920,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11629,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":8132,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def fibonacci(n):\n if n == n - 1 + (n - 2):\n return n\n else:\n fibonacci(n + 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":13140,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":27586,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":38573,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":40786,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":15273,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":11596,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def fibonacci(n):\n if n == n - 1 + (n - 2):\n return n\n else:\n fibonacci(n + 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":6880,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":false} +{"submission_id":1063,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":false} +{"submission_id":4529,"user":"fc19956d-3237-43b9-841d-e5882c3359f1","date":"2017-04-27 17:48:46","func_code":"def fibonacci(n):\n if n == n - 1 + (n - 2):\n return n\n else:\n fibonacci(n + 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26847,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:08:44","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":25465,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:08:44","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":2064,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:08:51","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":26898,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:08:51","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":25829,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:09:06","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":13831,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:09:06","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":2325,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:09:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":15520,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:09:12","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":14139,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:09:18","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":32056,"user":"f1c26f39-fb4c-4010-aaa3-142fb52f57b9","date":"2017-04-27 18:09:18","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":24304,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-27 18:11:05","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":14808,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-27 18:11:05","func_code":"def quicksort(A, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":41170,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-27 18:36:18","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[i], a[p] = a[p], a[i]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":29331,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-27 18:36:18","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[i], a[p] = a[p], a[i]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":39710,"user":"ba8a7560-aac9-45ef-b6fd-730b60e73e8c","date":"2017-04-27 18:36:18","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[i], a[p] = a[p], a[i]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":7838,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 21:17:24","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":6200,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 21:17:24","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":1923,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 21:17:33","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39728,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 21:17:33","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":41253,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 22:26:53","func_code":"def quicksort(A, beg, end):\n if end - beg < 1:\n return\n i = j = beg\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, beg, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":40404,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 22:26:53","func_code":"def quicksort(A, beg, end):\n if end - beg < 1:\n return\n i = j = beg\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, beg, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":5219,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 22:27:04","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":28679,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 22:27:04","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":34397,"user":"daaef1e8-1fe4-4dc4-b002-6e89fad22a66","date":"2017-04-27 22:27:04","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":14939,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 02:29:26","func_code":"def swap_first_last(a, first, last):\n if first >= last:\n return\n a[first], a[last] = a[last], a[first]\n first += 1\n last -= 1\n swap_first_last(a, first, last)\n\n\ndef reverse_list(a):\n swap_first_last(a, 0, len(a) - 1)\n return a","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":23484,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 02:29:26","func_code":"def swap_first_last(a, first, last):\n if first >= last:\n return\n a[first], a[last] = a[last], a[first]\n first += 1\n last -= 1\n swap_first_last(a, first, last)\n\n\ndef reverse_list(a):\n swap_first_last(a, 0, len(a) - 1)\n return a","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":38080,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 02:43:32","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":39390,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 02:43:32","func_code":"def fibonacci(n):\n if n <= 1:\n return 1\n return fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":2902,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 02:45:28","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":19302,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 02:45:28","func_code":"def partition(a, p, r):\n q = j = p\n while j < r:\n if a[j] <= a[r]:\n a[q], a[j] = a[j], a[q]\n q += 1\n j += 1\n a[q], a[r] = a[r], a[q]\n return q\n\n\ndef quicksort(a, p, r):\n if r <= p:\n return\n q = partition(a, p, r)\n quicksort(a, p, q - 1)\n quicksort(a, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":21598,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-28 10:12:22","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":23204,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-28 10:13:56","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":30243,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-28 10:13:56","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":14300,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-28 10:13:56","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":9899,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 10:25:50","func_code":"def power(a, b):\n if b == 0:\n return 1\n return a * power(a, b - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":32853,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 10:25:50","func_code":"def power(a, b):\n if b == 0:\n return 1\n return a * power(a, b - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":10134,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 10:44:00","func_code":"def minimum(a):\n i = 1\n s = a[0]\n while i < len(a):\n if s > a[i]:\n s = a[i]\n i = i + 1\n return s","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":14306,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 10:44:00","func_code":"def minimum(a):\n i = 1\n s = a[0]\n while i < len(a):\n if s > a[i]:\n s = a[i]\n i = i + 1\n return s","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":31237,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 10:52:57","func_code":"def maximum(a):\n a = sorted(a)\n return a[len(a) - 1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":40187,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 10:52:57","func_code":"def maximum(a):\n a = sorted(a)\n return a[len(a) - 1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":10572,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:06:04","func_code":"def count_letters(a):\n if a == '':\n return 0\n a = a[:-1]\n n = 1\n return n + count_letters(a)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":22519,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:06:04","func_code":"def count_letters(a):\n if a == '':\n return 0\n a = a[:-1]\n n = 1\n return n + count_letters(a)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":5228,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:21:11","func_code":"def power(n, mult):\n if mult == 0:\n return 0\n n * n\n power(n, mult - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":14185,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:22:27","func_code":"def power(n, mult):\n if mult == 0:\n return 0\n return n ** mult\n power(n, mult - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":40889,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:22:49","func_code":"def power(n, mult):\n return n ** mult\n power(n, mult - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":23687,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:22:49","func_code":"def power(n, mult):\n return n ** mult\n power(n, mult - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":41299,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:28:39","func_code":"def reverse_list(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a.pop())\n i = i + 1\n return b","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":741,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:28:39","func_code":"def reverse_list(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a.pop())\n i = i + 1\n return b","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":22898,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:30:56","func_code":"def power(n, m):\n if m == 1:\n return n\n if m == 0:\n return 1\n return n * power(n, m - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":22550,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:30:56","func_code":"def power(n, m):\n if m == 1:\n return n\n if m == 0:\n return 1\n return n * power(n, m - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":20982,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:33:52","func_code":"def fibonacci(a):\n if a == 0 or a == 1:\n return 1\n return fibonacci(a - 1) + fibonacci(a - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":41032,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:33:52","func_code":"def fibonacci(a):\n if a == 0 or a == 1:\n return 1\n return fibonacci(a - 1) + fibonacci(a - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":14591,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:33:54","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":5843,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:33:54","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n if l[0] < l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return minimum(l)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":9884,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:34:41","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":26709,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:34:41","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n if l[0] > l[1]:\n l.remove(l[1])\n else:\n l.remove(l[0])\n return maximum(l)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":869,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:35:37","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":42478,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:35:37","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":410,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:37:50","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":38821,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:37:50","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":12333,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:38:13","func_code":"def minimum(lis, p=0):\n if lis == []:\n return p\n n = pop(lis)\n if n > p:\n p = n\n return minimum(lis)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":26519,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:38:27","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":33064,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:38:27","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":19613,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:38:36","func_code":"def minimum(lis, p=0):\n if lis == []:\n return p\n n = lis.pop()\n if n > p:\n p = n\n return minimum(lis)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":7207,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:39:04","func_code":"def minimum(lis, p=0):\n if lis == []:\n return p\n n = lis.pop()\n if n > p:\n p = n\n return minimum(lis, p)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":35090,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:40:13","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":21702,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:40:13","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":23798,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:40:47","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":27487,"user":"fccb16a1-abd7-4ee8-a2c6-5b7653d7a7dc","date":"2017-04-28 11:40:47","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":1140,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:44:15","func_code":"def minimum(lis, p=100000000000000000000000000000000000000000000):\n if lis == []:\n return p\n n = lis.pop()\n if n < p:\n p = n\n return minimum(lis, p)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":38261,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:44:15","func_code":"def minimum(lis, p=100000000000000000000000000000000000000000000):\n if lis == []:\n return p\n n = lis.pop()\n if n < p:\n p = n\n return minimum(lis, p)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":2861,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:45:33","func_code":"def maximum(lis, p=0):\n if lis == []:\n return p\n n = lis.pop()\n if n > p:\n p = n\n return minimum(lis, p)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":3832,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:45:49","func_code":"def maximum(lis, p=0):\n if lis == []:\n return p\n n = lis.pop()\n if n > p:\n p = n\n return maximum(lis, p)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":9518,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:45:49","func_code":"def maximum(lis, p=0):\n if lis == []:\n return p\n n = lis.pop()\n if n > p:\n p = n\n return maximum(lis, p)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":36153,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:50:18","func_code":"def count_letters(s, c=0):\n if s == '':\n return c\n s = s[1:]\n c = c + 1\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":14251,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:50:37","func_code":"def count_letters(s, c=0):\n if s == '':\n return c\n s = s[1:]\n c = c + 1\n return count_letters(s, c)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":34720,"user":"e5db5e57-0261-4967-963a-42d1a98c03de","date":"2017-04-28 11:50:37","func_code":"def count_letters(s, c=0):\n if s == '':\n return c\n s = s[1:]\n c = c + 1\n return count_letters(s, c)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":6427,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:52:17","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":2481,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:52:17","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":34440,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:57:52","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":28604,"user":"030c2a56-757a-4b4d-ac91-67aecc3d9b33","date":"2017-04-28 11:57:52","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n a[i], a[p] = a[p], a[i]\n i = i + 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":5811,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-28 11:59:10","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":11727,"user":"31fe4020-d4b7-4bf5-ac95-b28807a90ae8","date":"2017-04-28 11:59:10","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":17121,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 13:07:32","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":34940,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 13:07:32","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":17151,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 13:57:48","func_code":"def fibonacci(n):\n if n == 0 or n == 1 or n == 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":1584,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 13:58:03","func_code":"def fibonacci(n):\n if n == 0 or n == 1 or n == 2:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":25907,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:05:13","func_code":"def power(base, exp):\n if exp == 0:\n return 1\n elif exp == 1:\n return base\n else:\n base *= base\n new_exp = exp - 1\n power(base, exp)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":27282,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:05:36","func_code":"def power(base, exp):\n if exp == 0:\n return 1\n elif exp == 1:\n return base\n else:\n base *= base\n new_exp = exp - 1\n power(base, new_exp)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":3011,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:06:42","func_code":"def power(base, exp):\n if exp == 0:\n return 1\n elif exp == 1:\n return base\n else:\n base *= base\n new_exp = exp - 1\n return power(base, new_exp)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":19500,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:07:39","func_code":"def power(base, exp):\n if exp == 0:\n return 1\n elif exp == 1:\n return base\n else:\n new_base = base * base\n new_exp = exp - 1\n return power(new_base, new_exp)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":32413,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 14:14:13","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":34993,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 14:14:27","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":34390,"user":"2f34a0ed-0d6a-447e-8e47-6a90f11d53a7","date":"2017-04-28 14:14:27","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":11250,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:31:38","func_code":"def power(base, exp, mult=None):\n if mult is None:\n mult = base\n if exp == 0:\n return 1\n elif exp == 1:\n return base\n else:\n new_base = base * mult\n new_exp = exp - 1\n return power(new_base, new_exp, mult)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":23281,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:31:38","func_code":"def power(base, exp, mult=None):\n if mult is None:\n mult = base\n if exp == 0:\n return 1\n elif exp == 1:\n return base\n else:\n new_base = base * mult\n new_exp = exp - 1\n return power(new_base, new_exp, mult)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":27292,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:33:46","func_code":"def minimum(l):\n min = inf\n for item in l:\n min = item if item < min else min\n return min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":2504,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:34:22","func_code":"def minimum(l):\n min = None\n for item in l:\n min = item if min == None or item < min else min\n return min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":38645,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:35:03","func_code":"def maximum(l):\n min = None\n for item in l:\n min = item if min == None or item > min else min\n return min","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":9150,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:35:42","func_code":"def maximum(l):\n max = None\n for item in l:\n max = item if max == None or item > max else max\n return max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":14802,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:38:17","func_code":"def maximum(l, old_max=None):\n item = l[0]\n if item != None:\n new_l = l[1:]\n maximum(new_l, item if old_max == None or item > old_max else old_max)\n else:\n return old_max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":36796,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:39:28","func_code":"_A = None\n\n\ndef maximum(l, old_max=_A):\n try:\n item = l[0]\n except IndexError:\n item = _A\n if item is not _A:\n new_l = l[1:]\n maximum(new_l, item if old_max == _A or item > old_max else old_max)\n else:\n return old_max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":false} +{"submission_id":40750,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:40:52","func_code":"_A = None\n\n\ndef maximum(l, old_max=_A):\n try:\n item = l[0]\n except IndexError:\n item = _A\n if item is not _A:\n new_l = l[1:]\n return maximum(new_l, item if old_max == _A or item > old_max else\n old_max)\n else:\n return old_max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":32786,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:40:52","func_code":"_A = None\n\n\ndef maximum(l, old_max=_A):\n try:\n item = l[0]\n except IndexError:\n item = _A\n if item is not _A:\n new_l = l[1:]\n return maximum(new_l, item if old_max == _A or item > old_max else\n old_max)\n else:\n return old_max","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":32559,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:41:29","func_code":"_A = None\n\n\ndef minimum(l, old_min=_A):\n try:\n item = l[0]\n except IndexError:\n item = _A\n if item is not _A:\n new_l = l[1:]\n return minimum(new_l, item if old_min == _A or item < old_min else\n old_min)\n else:\n return old_min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":39712,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:41:29","func_code":"_A = None\n\n\ndef minimum(l, old_min=_A):\n try:\n item = l[0]\n except IndexError:\n item = _A\n if item is not _A:\n new_l = l[1:]\n return minimum(new_l, item if old_min == _A or item < old_min else\n old_min)\n else:\n return old_min","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":9361,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:45:49","func_code":"def count_letters(item, length=0):\n try:\n item[0]\n except IndexError:\n return length\n item = item[1:]\n length += 1\n return count_letters(item, length)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":5817,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:45:49","func_code":"def count_letters(item, length=0):\n try:\n item[0]\n except IndexError:\n return length\n item = item[1:]\n length += 1\n return count_letters(item, length)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":28534,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:50:37","func_code":"def reverse_list(l, new_l=None):\n if new_l is None:\n new_l = []\n if len(l) > 0:\n i = l[0]\n l = l[1:]\n new_l = [i] + new_l\n return reverse_list(l, new_l)\n else:\n return new_l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":18130,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:50:37","func_code":"def reverse_list(l, new_l=None):\n if new_l is None:\n new_l = []\n if len(l) > 0:\n i = l[0]\n l = l[1:]\n new_l = [i] + new_l\n return reverse_list(l, new_l)\n else:\n return new_l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":19287,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:53:48","func_code":"def fibonacci(n):\n return n if n < 2 else fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":22240,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:54:05","func_code":"def fibonacci(n):\n return 1 if n < 2 else fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":38300,"user":"d566071f-0679-42ce-9081-3fac29a67d21","date":"2017-04-28 14:54:05","func_code":"def fibonacci(n):\n return 1 if n < 2 else fibonacci(n - 2) + fibonacci(n - 1)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":16093,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:12:23","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":1473,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:12:23","func_code":"def quicksort(A, start, end):\n if end - start < 1:\n return\n i = j = start\n while i <= end:\n if A[i] <= A[end]:\n A[i], A[j] = A[j], A[i]\n j += 1\n i += 1\n quicksort(A, start, j - 2)\n quicksort(A, j, end)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":25533,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:13:11","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":24653,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:13:11","func_code":"def selectionsort(A):\n for i in range(len(A)):\n min_j = i\n for j in range(i, len(A)):\n if A[j] < A[min_j]:\n min_j = j\n A[i], A[min_j] = A[min_j], A[i]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":24268,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:16:25","func_code":"def fibonacci(s):\n if s == 0:\n return 1\n else:\n return fibonacci(s - 1) + fibonacci(s + 5)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":28186,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:16:52","func_code":"def fibonacci(s):\n if s == 0:\n return 1\n else:\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":20869,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:17:32","func_code":"def fibonacci(s):\n if s <= 1:\n return 1\n else:\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":36574,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:17:32","func_code":"def fibonacci(s):\n if s <= 1:\n return 1\n else:\n return fibonacci(s - 1) + fibonacci(s - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":9744,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:25:06","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":18481,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:25:06","func_code":"def count_letters(s):\n if s == '':\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":37787,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:25:45","func_code":"def power(n, p):\n if p == 0:\n return 1\n else:\n return power(n, p - 1) * n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":39920,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:25:45","func_code":"def power(n, p):\n if p == 0:\n return 1\n else:\n return power(n, p - 1) * n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":14870,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:26:23","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":22618,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:26:23","func_code":"def minimum(l):\n if len(l) == 1:\n return l[0]\n else:\n min_ret = minimum(l[1:])\n return l[0] if l[0] < min_ret else min_ret","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":12789,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:26:51","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":22946,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:26:51","func_code":"def maximum(l):\n if len(l) == 1:\n return l[0]\n else:\n max_ret = maximum(l[1:])\n return l[0] if l[0] > max_ret else max_ret","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":2377,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:27:53","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":11906,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:27:53","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":40068,"user":"f56d6cc3-92a7-49e7-aa07-2e1c83caaabe","date":"2017-04-28 15:27:53","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":9351,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-04-28 15:43:46","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":21694,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-04-28 15:43:46","func_code":"def reverse_list(l):\n if l == []:\n return []\n temp = reverse_list(l[1:])\n temp.append(l[0])\n return temp","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":25642,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 15:44:23","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":31046,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 15:44:23","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":29502,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-04-28 15:45:20","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":35765,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-04-28 15:45:20","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":14603,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:00:47","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":31146,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:00:47","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":11946,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:05:38","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":33561,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:05:38","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":8916,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:18:12","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":8489,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:18:12","func_code":"def power(m, n):\n return m ** n","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":25211,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:23:17","func_code":"def minimum(l):\n return sorted(l)[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":32535,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:23:17","func_code":"def minimum(l):\n return sorted(l)[0]","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":25701,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:24:54","func_code":"def maximum(l):\n return sorted(l)[len(l) - 1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":15989,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:24:54","func_code":"def maximum(l):\n return sorted(l)[len(l) - 1]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":37722,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:29:15","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":30509,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:29:15","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":9396,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:31:18","func_code":"def count_letters(s):\n length = 0\n for i in s:\n length += 1\n return length","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":15612,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:31:18","func_code":"def count_letters(s):\n length = 0\n for i in s:\n length += 1\n return length","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":35426,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:36:09","func_code":"def reverse_list(l):\n new_l = []\n sortedl = [i for i in sorted[l]]\n for i in range(len(l)):\n new_l += sortedl[len(l) - i - 1]","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":27374,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 16:36:25","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = 0\n while j < len(a):\n if a[j] > a[i]:\n a[i], a[j] = a[j], a[i]\n j += 1\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":41097,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 16:36:25","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = 0\n while j < len(a):\n if a[j] > a[i]:\n a[i], a[j] = a[j], a[i]\n j += 1\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":12221,"user":"41c113b8-6f57-4003-bed3-3587b2376170","date":"2017-04-28 16:36:25","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n j = 0\n while j < len(a):\n if a[j] > a[i]:\n a[i], a[j] = a[j], a[i]\n j += 1\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":245,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:36:48","func_code":"def reverse_list(l):\n new_l = []\n sortedl = [i for i in sorted[l]]\n for i in range(len(l)):\n new_l += sortedl[len(l) - i - 1]\n return new_l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":31318,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:38:17","func_code":"def reverse_list(l):\n new_l = []\n sortedl = [i for i in sorted(l)]\n for i in range(len(l)):\n new_l += sortedl[len(l) - i - 1]\n return new_l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":6857,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:39:21","func_code":"def reverse_list(l):\n new_l = []\n sortedl = [i for i in sorted(l)]\n for i in range(len(l)):\n new_l.append(sortedl[len(l) - i - 1])\n return new_l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":35559,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:42:01","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n new_l = []\n sortedl = [i for i in sorted(l)]\n for i in range(len(l)):\n new_l.append(sortedl[len(l) - i - 1])\n return new_l","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":36364,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:47:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":42282,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:47:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":1502,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:53:16","func_code":"def fibonacci(n):\n if n == 0 or n == 1 or n == 2:\n return 1\n else:\n return n - 1 + (n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":13443,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:53:57","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return n - 1 + (n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":34811,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:54:23","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":16335,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 16:54:23","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":22575,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:56:12","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":13518,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 16:56:12","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":11398,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:05:07","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":33354,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:05:07","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":22458,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:12:53","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":11766,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:12:53","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":31100,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-28 17:15:17","func_code":"def count_letters(s):\n if not s:\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":30513,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-28 17:15:17","func_code":"def count_letters(s):\n if not s:\n return 0\n else:\n return 1 + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":9886,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:15:29","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":7706,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:15:29","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":24185,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:15:36","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":17835,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:15:36","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":5179,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:19:20","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":42320,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:19:26","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":29811,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:19:26","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":16078,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:19:35","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":39793,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:19:35","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":8628,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:20:18","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":24576,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:20:18","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":2370,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:21:03","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":32296,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:21:03","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":4119,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:21:06","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":18428,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:21:06","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":15446,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:22:20","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":38155,"user":"2b99bb5a-b2e4-4bc1-b1ae-ecb59c74bd22","date":"2017-04-28 17:22:20","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":22607,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:26:02","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":26980,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:26:02","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":28524,"user":"a4f49b67-25e5-43c2-a48c-827c1919659f","date":"2017-04-28 17:26:02","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":27046,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-28 17:32:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":16146,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-28 17:32:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":15303,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-04-28 17:32:25","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":17585,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 17:39:32","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":19113,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 17:39:32","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":3379,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 17:41:26","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":27564,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 17:41:26","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":17574,"user":"a2b86688-0a82-4779-8335-a584906257b0","date":"2017-04-28 17:41:26","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":35720,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-28 18:01:20","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":8361,"user":"2157ade0-6890-435b-8669-a884e3233bc7","date":"2017-04-28 18:01:20","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":19058,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:12:02","func_code":"def fibonacci(n):\n if n == 1:\n return 1\n elif n == 2:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33326,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:14:14","func_code":"def fibonacci(n):\n if n == 1:\n return 1\n elif n == 2:\n return 1\n elif n > 2:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":2209,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:15:02","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n elif n >= 2:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":35589,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:15:31","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":29602,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:15:31","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":12298,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:19:44","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":5940,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:19:44","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":5384,"user":"e84cb3e0-5b98-4543-816e-a3570ba72e05","date":"2017-04-28 18:19:44","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n else:\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":37505,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 18:56:32","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":21978,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:09:48","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":21616,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:09:48","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":39461,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:09:52","func_code":"def minimum(a):\n if len(a) == 1:\n return a\n b = max(a)\n a.replace(b, '')\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":28618,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:11:11","func_code":"def minimum(a):\n if len(a) == 1:\n return a\n b = max(a)\n a = [c for c in a if c != b]\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":40125,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:11:42","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n b = max(a)\n a = [c for c in a if c != b]\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":31655,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:11:42","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n b = max(a)\n a = [c for c in a if c != b]\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":23681,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:13:53","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n b = min(a)\n a = [c for c in a if c != b]\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":9307,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:13:53","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n b = min(a)\n a = [c for c in a if c != b]\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":26326,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:20:50","func_code":"def count_letters(s):\n total = 0\n if s == '':\n return total\n total += 1\n s = s[:-2]\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":34933,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:21:13","func_code":"def count_letters(s):\n total = 0\n if s == '':\n return total\n total += 1\n s = s[:-2]\n print(s)\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":38175,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:21:47","func_code":"def count_letters(s):\n total = 0\n if s == '':\n return total\n total += 1\n s = s[:-1]\n print(s)\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":6873,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:22:12","func_code":"def count_letters(s):\n total = 0\n if s == '':\n return total\n total += 1\n print(total)\n s = s[:-1]\n print(s)\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":9045,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:22:44","func_code":"def count_letters(s):\n if s == '':\n return total\n total += 1\n print(total)\n s = s[:-1]\n print(s)\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":7192,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:23:28","func_code":"def count_letters(s):\n if s == '':\n return total\n total += 1\n s = s[:-1]\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":30463,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:25:42","func_code":"def count_letters(s):\n total = 0\n if s == '':\n return total\n for t in s:\n total += 1\n s = ''\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":16784,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:26:09","func_code":"def count_letters(s):\n total = 0\n if s == '':\n return total\n for t in s:\n total += 1\n print(total)\n s = ''\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":37401,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:26:49","func_code":"def count_letters(s):\n if s == '':\n return total\n for t in s:\n total = 0\n total += 1\n print(total)\n s = ''\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":36284,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 19:27:26","func_code":"def count_letters(s):\n for t in s:\n total = 0\n total += 1\n if s == '':\n return total\n s = ''\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":8937,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:18:14","func_code":"def count_letters(s):\n try:\n if s == '':\n return b\n except IndexError:\n return 0\n b = s.index(s[-1])\n s = ''\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":23935,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:19:54","func_code":"def count_letters(s):\n b = s.index(s[-1])\n s = ''\n try:\n if s == '':\n return b\n except IndexError:\n return 0\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":21110,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:20:14","func_code":"def count_letters(s):\n b = s.index(s[-1]) + 1\n s = ''\n try:\n if s == '':\n return b\n except IndexError:\n return 0\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":26953,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:21:02","func_code":"def count_letters(s):\n try:\n b = s.index(s[-1]) + 1\n except IndexError:\n return 0\n s = ''\n if s == '':\n return b\n return count_letters(s)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":8237,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:50:38","func_code":"def power(a, b):\n return a ** b","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":24549,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:50:38","func_code":"def power(a, b):\n return a ** b","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":13869,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:52:13","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":11089,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:53:18","func_code":"def count_letters(s):\n n = 0\n print(s)\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":20688,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:53:44","func_code":"def minimum(l):\n biggest = l[0]\n for c in l:\n if c < biggest:\n biggest = c\n return biggest","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":38011,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:53:44","func_code":"def minimum(l):\n biggest = l[0]\n for c in l:\n if c < biggest:\n biggest = c\n return biggest","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":24944,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:55:10","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":8484,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:55:14","func_code":"def maximum(l):\n biggest = l[0]\n for c in l:\n if c > biggest:\n biggest = c\n return biggest","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":31502,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:55:14","func_code":"def maximum(l):\n biggest = l[0]\n for c in l:\n if c > biggest:\n biggest = c\n return biggest","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":22852,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:55:55","func_code":"def count_letters(s):\n n = 0\n print(n)\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":39619,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:57:03","func_code":"def count_letters(s):\n n = 0\n print(n)\n if not s:\n return 0\n else:\n n += 1\n print(n)\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":4179,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:57:27","func_code":"def count_letters(s):\n n = 0\n print(n)\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":25013,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:57:36","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":1522,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 20:57:36","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":37696,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:57:50","func_code":"def count_letters(s):\n counter = 0\n if s == '':\n return 0\n else:\n for c in s:\n counter += 1\n return counter","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":4096,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 20:57:50","func_code":"def count_letters(s):\n counter = 0\n if s == '':\n return 0\n else:\n for c in s:\n counter += 1\n return counter","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":15262,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:04:44","func_code":"def reverse_list(l):\n l2 = []\n i = 0\n while l:\n l2.append(l[len(l) - i - 1])\n tmp = l.pop()\n return l2","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":22551,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:04:44","func_code":"def reverse_list(l):\n l2 = []\n i = 0\n while l:\n l2.append(l[len(l) - i - 1])\n tmp = l.pop()\n return l2","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":14541,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-28 21:08:51","func_code":"def count_letters(m):\n if m == '':\n return 0\n else:\n return 1 + count_letters(m[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":5786,"user":"9675c8b9-337a-4fd1-bb8f-8e3510c7f703","date":"2017-04-28 21:08:51","func_code":"def count_letters(m):\n if m == '':\n return 0\n else:\n return 1 + count_letters(m[:-1])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":38347,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:10:33","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":7936,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:10:33","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":37742,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:17:08","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += j\n a[p], a[i] = a[i], a[p]\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":22986,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:19:42","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += j\n a[p], a[i] = a[i], a[p]\n i += 1\n return a","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":8221,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:20:07","func_code":"def power():\n if x == 0:\n return 1\n return 2 * power(x - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":5456,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:20:38","func_code":"def power(x, n):\n if x == 0:\n return 1\n return n * power(x - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":30049,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:20:59","func_code":"def power(n, x):\n if x == 0:\n return 1\n return n * power(x - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":32870,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:27:22","func_code":"def power(n, x):\n if x == 0:\n return 1\n return n * power(n, x - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":6945,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:27:22","func_code":"def power(n, x):\n if x == 0:\n return 1\n return n * power(n, x - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":21961,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:29:27","func_code":"def minimum(l, m=None):\n if not len(l):\n return m\n if not m or l[0] < m:\n return minimum(l[1:], l[0])\n return minimum(l[1:], m)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":28876,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:29:27","func_code":"def minimum(l, m=None):\n if not len(l):\n return m\n if not m or l[0] < m:\n return minimum(l[1:], l[0])\n return minimum(l[1:], m)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":38391,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:32:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":6545,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:32:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":41989,"user":"f0b2f578-ae0f-4ddc-94e9-204708d09f37","date":"2017-04-28 21:32:01","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":20221,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:34:24","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":15237,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:34:24","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":40988,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:34:28","func_code":"def minimum(a):\n if len(a) == 1:\n return a[-1]\n elif a[0] < a[-1]:\n return minimum(a[:-1])\n elif a[0] > a[-1]:\n return minimum(a[1:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":29480,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:34:28","func_code":"def minimum(a):\n if len(a) == 1:\n return a[-1]\n elif a[0] < a[-1]:\n return minimum(a[:-1])\n elif a[0] > a[-1]:\n return minimum(a[1:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":12419,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:34:49","func_code":"def count_letters(s, c=0):\n if not s:\n return c\n return count_letters(s[:-1], c + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":37990,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:34:49","func_code":"def count_letters(s, c=0):\n if not s:\n return c\n return count_letters(s[:-1], c + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":21668,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:38:51","func_code":"def reverse_list(l, r=None):\n if not r:\n r = []\n if not l:\n return r\n r.append(l.pop())\n return reverse_list(l, r)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":17126,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:38:51","func_code":"def reverse_list(l, r=None):\n if not r:\n r = []\n if not l:\n return r\n r.append(l.pop())\n return reverse_list(l, r)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":21928,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:38:59","func_code":"def maximum(a):\n if len(a) == 1:\n return a[-1]\n elif a[0] > a[-1]:\n return maximum(a[:-1])\n elif a[0] < a[-1]:\n return maximum(a[1:])","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":21763,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:38:59","func_code":"def maximum(a):\n if len(a) == 1:\n return a[-1]\n elif a[0] > a[-1]:\n return maximum(a[:-1])\n elif a[0] < a[-1]:\n return maximum(a[1:])","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":24197,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:42:52","func_code":"def fibonacci(n, l=0, c=1):\n if not n:\n return c\n return fibonacci(n - 1, c, l + c)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":14752,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 21:42:52","func_code":"def fibonacci(n, l=0, c=1):\n if not n:\n return c\n return fibonacci(n - 1, c, l + c)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":33408,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:43:33","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":1599,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:46:02","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":4353,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:46:12","func_code":"def fibonacci(n):\n if n == (0 or 1):\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":14254,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:46:31","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":14432,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 21:46:31","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":34670,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 21:59:41","func_code":"def reverse_list(l, ding=None):\n if not ding:\n ding = []\n if not l:\n return ding\n ding.append(l.pop())\n return reverse_list(l, ding)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":18766,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 21:59:54","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":27608,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 21:59:54","func_code":"def minimum(a):\n if len(a) == 1:\n return a[0]\n if a[0] < a[1]:\n a.remove(a[1])\n return minimum(a)\n else:\n a.remove(a[0])\n return minimum(a)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":30362,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 21:59:59","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":4735,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 21:59:59","func_code":"def power(m, n):\n if n == 0:\n return 1\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":18870,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:04","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":23473,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:04","func_code":"def maximum(a):\n if len(a) == 1:\n return a[0]\n if a[0] > a[1]:\n a.remove(a[1])\n return maximum(a)\n else:\n a.remove(a[0])\n return maximum(a)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":34770,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:08","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":11813,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:14","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":12187,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:14","func_code":"def count_letters(s):\n n = 0\n if not s:\n return 0\n else:\n n += 1\n return n + count_letters(s[1:])","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":14921,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:18","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":14616,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:23","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":18073,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:23","func_code":"def reverse_list(a):\n if len(a) == 0:\n return []\n return [a[-1]] + reverse_list(a[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":14333,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:27","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":28167,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:27","func_code":"def fibonacci(n):\n if n == 1 or n == 0:\n return 1\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":27663,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:33","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":29005,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:33","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":30630,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":10729,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":37029,"user":"427cdab9-477f-4fb3-92b0-bf5eef785c90","date":"2017-04-28 22:00:37","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":29383,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 22:06:16","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":16983,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 22:06:16","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":35213,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 22:07:03","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":41737,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 22:07:03","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":7143,"user":"3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5","date":"2017-04-28 22:07:03","func_code":"def selectionsort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":17690,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:14:59","func_code":"def quicksort(l):\n if len(l) < 2:\n return l\n pivot = l[0]\n left = []\n right = []\n for n in l[1:]:\n if n < pivot:\n left.append(n)\n else:\n right.append(n)\n return quicksort(left) + [pivot] + quicksort(right)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":42257,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:15:22","func_code":"def quicksort(l):\n if len(l) < 2:\n return l\n pivot = l[0]\n left = []\n right = []\n for n in l[1:]:\n if n < pivot:\n left.append(n)\n else:\n right.append(n)\n return quicksort(left) + [pivot] + quicksort(right)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":25167,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:22:08","func_code":"def fibonacci(aaliyah, supercalifragilisticespialidotious=0, koppaberg=1):\n if not aaliyah:\n return koppaberg\n return fibonacci(aaliyah - 1, koppaberg, \n supercalifragilisticespialidotious + koppaberg)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":37788,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:22:08","func_code":"def fibonacci(aaliyah, supercalifragilisticespialidotious=0, koppaberg=1):\n if not aaliyah:\n return koppaberg\n return fibonacci(aaliyah - 1, koppaberg, \n supercalifragilisticespialidotious + koppaberg)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":6103,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:22:18","func_code":"def reverse_list(l, ding=None):\n if not ding:\n ding = []\n if not l:\n return ding\n ding.append(l.pop())\n return reverse_list(l, ding)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":33670,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:22:18","func_code":"def reverse_list(l, ding=None):\n if not ding:\n ding = []\n if not l:\n return ding\n ding.append(l.pop())\n return reverse_list(l, ding)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":3943,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:24:47","func_code":"def quicksort(cabbages):\n if len(l) < 2:\n return l\n pivot = l[0]\n left_side = []\n right_side = []\n for n in cabbages[1:]:\n if n < pivot:\n left_side.append(n)\n else:\n right_side.append(n)\n return quicksort(left_side) + [pivot] + quicksort(right_side)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":8379,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:25:41","func_code":"def quicksort(cabbages):\n if len(l) < 2:\n return l\n pivot = l[0]\n left_side = []\n right_side = []\n for n in cabbages[1:]:\n if n < pivot:\n left_side.append(n)\n else:\n right_side.append(n)\n return quicksort(left_side) + [pivot] + quicksort(right_side)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":16731,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 22:26:01","func_code":"def quicksort(l):\n if len(l) < 2:\n return l\n pivot = l[0]\n left = []\n right = []\n for n in l[1:]:\n if n < pivot:\n left.append(n)\n else:\n right.append(n)\n return quicksort(left) + [pivot] + quicksort(right)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":1979,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-28 22:26:10","func_code":"def quicksort(l, first, last):\n if first >= last:\n return\n i, j = first, last\n pivot = l[random.randint(first, last)]\n while i <= j:\n while l[i] < pivot:\n i += 1\n while l[j] > pivot:\n j -= 1\n if i <= j:\n l[i], l[j] = l[j], l[i]\n i, j = i + 1, j - 1\n quicksort(l, first, j)\n quicksort(l, i, last)\n return l","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":29079,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-28 22:26:10","func_code":"def quicksort(l, first, last):\n if first >= last:\n return\n i, j = first, last\n pivot = l[random.randint(first, last)]\n while i <= j:\n while l[i] < pivot:\n i += 1\n while l[j] > pivot:\n j -= 1\n if i <= j:\n l[i], l[j] = l[j], l[i]\n i, j = i + 1, j - 1\n quicksort(l, first, j)\n quicksort(l, i, last)\n return l","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":30017,"user":"a493c80e-3567-462a-bcbe-7bd974d52d8a","date":"2017-04-28 22:26:10","func_code":"def quicksort(l, first, last):\n if first >= last:\n return\n i, j = first, last\n pivot = l[random.randint(first, last)]\n while i <= j:\n while l[i] < pivot:\n i += 1\n while l[j] > pivot:\n j -= 1\n if i <= j:\n l[i], l[j] = l[j], l[i]\n i, j = i + 1, j - 1\n quicksort(l, first, j)\n quicksort(l, i, last)\n return l","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":17210,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:34:56","func_code":"def quicksort(l, start=0, end=None):\n if len(l) < 2:\n return l\n pivot = l[0]\n left = []\n right = []\n for n in l[1:]:\n if n < pivot:\n left.append(n)\n else:\n right.append(n)\n return quicksort(left) + [pivot] + quicksort(right)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":11938,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:36:15","func_code":"def quicksort(l, start=0, end=None):\n if len(l) < 2:\n return l\n pivot = l[1]\n left = []\n right = []\n for n in l[1:]:\n if n < pivot:\n left.append(n)\n else:\n right.append(n)\n return quicksort(left) + [pivot] + quicksort(right)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":42471,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:43:18","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":31003,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:43:34","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":25923,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:43:49","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":25312,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:43:49","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":26406,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:47:00","func_code":"def selectionsort(l, o=None):\n if not o:\n o = []\n l = l[:]\n if not len(l):\n return o\n small = min(l)\n l.remove(small)\n o.append(small)\n return selectionsort(l, o)","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":false} +{"submission_id":8029,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:53:59","func_code":"def selectionsort(l):\n for i in range(len(l)):\n j = i + 1\n p = i\n while j < len(l):\n if l[j] < l[p]:\n p = j\n j += 1\n l[p], l[i] = l[i], l[p]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":38016,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:53:59","func_code":"def selectionsort(l):\n for i in range(len(l)):\n j = i + 1\n p = i\n while j < len(l):\n if l[j] < l[p]:\n p = j\n j += 1\n l[p], l[i] = l[i], l[p]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":1653,"user":"91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210","date":"2017-04-28 22:53:59","func_code":"def selectionsort(l):\n for i in range(len(l)):\n j = i + 1\n p = i\n while j < len(l):\n if l[j] < l[p]:\n p = j\n j += 1\n l[p], l[i] = l[i], l[p]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":7219,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:54:56","func_code":"def selectionsort(a):\n for i in range(len(a)):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":25602,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:54:56","func_code":"def selectionsort(a):\n for i in range(len(a)):\n j = i + 1\n p = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n a[p], a[i] = a[i], a[p]","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":2447,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:55:17","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":14110,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:55:45","func_code":"def fibonacci(n, last=0, curr=1):\n if not n:\n return curr\n return fibonacci(n - 1, curr, last + curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":24994,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:55:45","func_code":"def fibonacci(n, last=0, curr=1):\n if not n:\n return curr\n return fibonacci(n - 1, curr, last + curr)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":17710,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:57:15","func_code":"def reverse_list(a, reverse=None):\n if not reverse:\n reverse = []\n if len(a) < 1:\n return reverse\n reverse.append(a.pop())\n return reverse_list(a, reverse)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":38061,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:57:15","func_code":"def reverse_list(a, reverse=None):\n if not reverse:\n reverse = []\n if len(a) < 1:\n return reverse\n reverse.append(a.pop())\n return reverse_list(a, reverse)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":18883,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:57:45","func_code":"def count_letters(s, count=0):\n if not s:\n return count\n return count_letters(s[:-1], count + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":7186,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:57:45","func_code":"def count_letters(s, count=0):\n if not s:\n return count\n return count_letters(s[:-1], count + 1)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":31370,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:58:13","func_code":"def maximum(l, max_n=None):\n if not len(l):\n return max_n\n if not max_n or l[0] > max_n:\n return maximum(l[1:], l[0])\n return maximum(l[1:], max_n)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":39449,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 22:58:13","func_code":"def maximum(l, max_n=None):\n if not len(l):\n return max_n\n if not max_n or l[0] > max_n:\n return maximum(l[1:], l[0])\n return maximum(l[1:], max_n)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":831,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:02:24","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fib(n - 1) + fib(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":28915,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:02:43","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":21262,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:03:24","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":41662,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:03:24","func_code":"def fibonacci(n):\n if n == 0:\n return 1\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":25258,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:07:56","func_code":"def maximum(list):\n if len(list) == 1:\n return list[0]\n else:\n m = maximum(list[1:])\n return m if m > list[0] else list[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":3669,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:07:56","func_code":"def maximum(list):\n if len(list) == 1:\n return list[0]\n else:\n m = maximum(list[1:])\n return m if m > list[0] else list[0]","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":23197,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:09:48","func_code":"def minimum(list):\n if len(list) == 1:\n return list[0]\n else:\n return min(list[0], minimum(list[1:]))","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":36972,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:09:48","func_code":"def minimum(list):\n if len(list) == 1:\n return list[0]\n else:\n return min(list[0], minimum(list[1:]))","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":27272,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:11:02","func_code":"def count_letters(str):\n return len(str)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":33787,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:11:02","func_code":"def count_letters(str):\n return len(str)","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":20952,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:12:42","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":13023,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:12:42","func_code":"def reverse_list(l):\n if len(l) == 0:\n return []\n return [l[-1]] + reverse_list(l[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":34269,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:14:46","func_code":"def quicksort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":23222,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:14:46","func_code":"def quicksort(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":false} +{"submission_id":21055,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:16:44","func_code":"def selectionsort(alist):\n for fillslot in range(len(alist) - 1, 0, -1):\n positionOfMax = 0\n for location in range(1, fillslot + 1):\n if alist[location] > alist[positionOfMax]:\n positionOfMax = location\n temp = alist[fillslot]\n alist[fillslot] = alist[positionOfMax]\n alist[positionOfMax] = temp","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":27174,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:16:44","func_code":"def selectionsort(alist):\n for fillslot in range(len(alist) - 1, 0, -1):\n positionOfMax = 0\n for location in range(1, fillslot + 1):\n if alist[location] > alist[positionOfMax]:\n positionOfMax = location\n temp = alist[fillslot]\n alist[fillslot] = alist[positionOfMax]\n alist[positionOfMax] = temp","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":18489,"user":"4986b17f-a671-4d40-a5ca-1c65fd498cbf","date":"2017-04-28 23:16:44","func_code":"def selectionsort(alist):\n for fillslot in range(len(alist) - 1, 0, -1):\n positionOfMax = 0\n for location in range(1, fillslot + 1):\n if alist[location] > alist[positionOfMax]:\n positionOfMax = location\n temp = alist[fillslot]\n alist[fillslot] = alist[positionOfMax]\n alist[positionOfMax] = temp","func_name":"selectionsort","assignment_id":"selectionsort","academic_year":2016,"module":"ca117","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selectionsort([])==None and selectionsort([])==None and selectionsort([0])==None and selectionsort([0])==None","correct":true} +{"submission_id":3290,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 23:45:57","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":16401,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 23:45:57","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":27865,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-04-28 23:45:57","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":26945,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 23:52:06","func_code":"def minimum(lst):\n if len(lst) == 1:\n return lst[-1]\n elif lst[0] < lst[-1]:\n return minimum(lst[:-1])\n elif lst[0] > lst[-1]:\n return minimum(lst[1:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":31233,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 23:52:06","func_code":"def minimum(lst):\n if len(lst) == 1:\n return lst[-1]\n elif lst[0] < lst[-1]:\n return minimum(lst[:-1])\n elif lst[0] > lst[-1]:\n return minimum(lst[1:])","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":31023,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 23:53:17","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":18910,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 23:53:17","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":14379,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 23:53:22","func_code":"def power(n, x):\n if x == 0:\n return 1\n return n * power(n, x - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":25679,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 23:53:22","func_code":"def power(n, x):\n if x == 0:\n return 1\n return n * power(n, x - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":21561,"user":"4788f2f7-8b97-41a8-88ee-697183f85246","date":"2017-04-28 23:53:22","func_code":"def power(n, x):\n if x == 0:\n return 1\n return n * power(n, x - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":33921,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-28 23:58:10","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":40715,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-28 23:58:10","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":3935,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-04-28 23:58:10","func_code":"def quicksort(l, p, r):\n if r <= p:\n return\n q = j = p\n while j < r:\n if l[j] <= l[r]:\n l[q], l[j] = l[j], l[q]\n q += 1\n j += 1\n l[q], l[r] = l[r], l[q]\n quicksort(l, p, q - 1)\n quicksort(l, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":18620,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-05-02 15:04:26","func_code":"def power(n, m):\n if m == 1:\n return n\n if m == 0:\n return 1\n return n ** m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":38678,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-05-02 15:04:26","func_code":"def power(n, m):\n if m == 1:\n return n\n if m == 0:\n return 1\n return n ** m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":9188,"user":"422fe752-ca84-4537-b250-7de556e6ee94","date":"2017-05-02 15:04:26","func_code":"def power(n, m):\n if m == 1:\n return n\n if m == 0:\n return 1\n return n ** m","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":35689,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:44:22","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n print(a)\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":14498,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:44:22","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":18006,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:44:22","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":3410,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:44:22","func_code":"def countdown(num):\n while num > 0:\n print(num)\n num = num - 1\n time.sleep(0.1)\n return 'LIFT OFF!'","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":37314,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:50:50","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":17934,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:50:50","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n print(a)\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":36231,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:50:50","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":27515,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:50:50","func_code":"def countdown(num):\n while num > 0:\n print(num)\n num = num - 1\n time.sleep(0.1)\n return 'LIFT OFF!'","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":28681,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:56:43","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":20934,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:56:43","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":33599,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:56:43","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n print(a)\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":32303,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:56:43","func_code":"def countdown(num):\n while num > 0:\n print(num)\n num = num - 1\n time.sleep(0.1)\n time.sleep(0.1)\n return 'LIFT OFF!'","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":724,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:58:58","func_code":"def countdown(num):\n while num > 0:\n print(num)\n num = num - 1\n time.sleep(0.1)\n time.sleep(0.1)\n return 'LIFT OFF!'","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":13466,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:58:58","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":14231,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:58:58","func_code":"def fibonacci(n):\n a = 0\n b = 1\n for i in range(0, n):\n print(a)\n temp = a\n a = b\n b = temp + b\n return a","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":29693,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 13:58:58","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":14282,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":11202,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":20055,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":18865,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20691,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n fib = a + b\n a = b\n b = fib\n i += 1\n return fib","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":18167,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def countdown(num):\n while num >= 1:\n print(num)\n time.sleep(0.1)\n num = num - 1\n print('LIFT OFF!')","func_name":"countdown","assignment_id":"iterative08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":3560,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":16838,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":27169,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n fib = a + b\n a = b\n b = fib\n i += 1\n return fib","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":2436,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def search(word, letter):\n if letter in word:\n return True\n else:\n return False","func_name":"search","assignment_id":"search_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":23670,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def index(word, letter):\n i = 0\n while i < len(word):\n if letter not in word:\n return -1\n elif word[i] == letter:\n return i\n else:\n i = i + 1","func_name":"index","assignment_id":"index_iter","academic_year":2016,"module":"ca278","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0","correct":false} +{"submission_id":4846,"user":"1caca58f-3988-4910-af7d-3a09c8ed5647","date":"2017-05-04 14:17:03","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n a = 0\n b = 1\n i = 2\n while i <= n:\n fib = a + b\n a = b\n b = fib\n i += 1\n return fib","func_name":"fibonacci","assignment_id":"fibonacci_iter","academic_year":2016,"module":"ca278","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":25256,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:27:01","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26717,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:27:01","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":24654,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:33:24","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":40874,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:33:24","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":925,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:33:24","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":35711,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:33:24","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":3251,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:43:35","func_code":"def reverse(a):\n a = a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":15604,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:47:16","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":22358,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:51:28","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":33938,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:51:49","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":35622,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:54:13","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n return swap(a)","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":6309,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:54:50","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":28398,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:58:04","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":4032,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 19:58:04","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":36946,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 20:09:46","func_code":"def selection_sort(a):\n for i in a:\n j = 0\n while j < len(a):\n if i < a[j]:\n a[j] = i\n j += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":14105,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 20:13:17","func_code":"def selection_sort(a):\n for i in range(len(a)):\n j = 1\n if a[j] > a[i]:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n j += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":34509,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 20:14:29","func_code":"def selection_sort(a):\n for i in range(len(a)):\n j = 1\n if a[j] > a[i]:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n j += 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":27498,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 20:15:24","func_code":"def selection_sort(a):\n return sorted(a)","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":28262,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 20:15:24","func_code":"def selection_sort(a):\n return sorted(a)","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":27876,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-05-04 20:15:24","func_code":"def selection_sort(a):\n return sorted(a)","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":9423,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-05-09 11:17:23","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":31615,"user":"46954879-c4e4-4ce6-87d4-00184c62b522","date":"2017-05-09 11:17:23","func_code":"def swap_unique_keys_values(d):\n return dict([(v, k) for k, v in list(d.items()) if list(d.values()).\n count(v) == 1])","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":42421,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":11138,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":3060,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":32868,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":20189,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":38367,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":16888,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def countdown(num):\n if num == 0:\n print('LIFT OFF!')\n else:\n print(num)\n time.sleep(0.1)\n countdown(num - 1)","func_name":"countdown","assignment_id":"recursive08.py_ca278_countdown","academic_year":2016,"module":"ca278","description":null,"test":"","correct":true} +{"submission_id":17804,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca278","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":true} +{"submission_id":10717,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":19714,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":2296,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def index(str, letter, pos):\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str, letter, pos + 1)","func_name":"index","assignment_id":"index_recur","academic_year":2016,"module":"ca278","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2","correct":true} +{"submission_id":18157,"user":"b8085080-0ead-4e7d-88a1-f66d565aea2e","date":"2017-05-09 21:34:46","func_code":"def search(str, letter):\n if str == '':\n return False\n elif str[0] == letter:\n return True\n else:\n return search(str[1:], letter)","func_name":"search","assignment_id":"search_recur","academic_year":2016,"module":"ca278","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True","correct":true} +{"submission_id":35066,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-12 22:40:48","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return m * power(m, n)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":4685,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-12 22:41:12","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":652,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-12 22:41:12","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":38369,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-12 22:41:12","func_code":"def power(m, n):\n if n == 0:\n return 1\n else:\n return m * power(m, n - 1)","func_name":"power","assignment_id":"power_102.py_ca117_power","academic_year":2016,"module":"ca117","description":null,"test":"","correct":true} +{"submission_id":2158,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-05-12 23:14:14","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":13308,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-05-12 23:14:14","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":38126,"user":"fc73b043-0c96-4ce3-8b8f-2c4c98785aa6","date":"2017-05-12 23:14:14","func_code":"def partition(A, p, r):\n q = j = p\n while j < r:\n if A[j] <= A[r]:\n A[q], A[j] = A[j], A[q]\n q += 1\n j += 1\n A[q], A[r] = A[r], A[q]\n return q\n\n\ndef quicksort(A, p, r):\n if r <= p:\n return\n q = partition(A, p, r)\n quicksort(A, p, q - 1)\n quicksort(A, q + 1, r)","func_name":"quicksort","assignment_id":"quicksort","academic_year":2016,"module":"ca117","description":"Sort a list by recursively partitionioning list until sorted.","test":"assert quicksort([],0,0)==None and quicksort([],0,0)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 4, 3, 2, 1],0,4)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5, 5, 5, 5],0,3)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None and quicksort([5675, 564, 987, 154132, 8976, 0, -16221, 87526, 9826732986],0,8)==None","correct":true} +{"submission_id":40272,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 00:56:39","func_code":"def minimum(list):\n if len(list) == 1:\n return list[0]\n else:\n if list[-1] < list[0]:\n list.remove[-1]\n else:\n list.remove[0]\n return minmum(list)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":false} +{"submission_id":20295,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 00:59:20","func_code":"def minimum(list):\n if len(list) == 1:\n return list[0]\n else:\n if list[-1] < list[0]:\n list.pop(0)\n else:\n list.pop(-1)\n return minimum(list)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":10326,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 00:59:20","func_code":"def minimum(list):\n if len(list) == 1:\n return list[0]\n else:\n if list[-1] < list[0]:\n list.pop(0)\n else:\n list.pop(-1)\n return minimum(list)","func_name":"minimum","assignment_id":"minimum","academic_year":2016,"module":"ca117","description":"Return the minimum element in a list of numbers.","test":"assert minimum([0])==0 and minimum([2, 10, 23, 9, 187])==2 and minimum([-2, -26, 7, -123, -1236521])==-1236521 and minimum([3896, 3673, 45, 16715, 23673])==45","correct":true} +{"submission_id":18982,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 01:02:13","func_code":"def maximum(list):\n if len(list) == 1:\n return list[0]\n else:\n if list[-1] < list[0]:\n list.pop(-1)\n else:\n list.pop(0)\n return maximum(list)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":11025,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 01:02:13","func_code":"def maximum(list):\n if len(list) == 1:\n return list[0]\n else:\n if list[-1] < list[0]:\n list.pop(-1)\n else:\n list.pop(0)\n return maximum(list)","func_name":"maximum","assignment_id":"maximum","academic_year":2016,"module":"ca117","description":"Return the maximum element in a list of numbers.","test":"assert maximum([0])==0 and maximum([67, 1, 2, -2, 0])==67 and maximum([0, -2, 2, 1, 67])==67 and maximum([-10, -23, -45, -9, -45617])==-9","correct":true} +{"submission_id":899,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 01:32:31","func_code":"def count_letters(string):\n if not string:\n return 0\n else:\n return 1 + count_letters(string.replace(string[0], ''))","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":5658,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 01:53:00","func_code":"def count_letters(string):\n if not string:\n return 0\n else:\n return 1 + count(string.replace(string[0], ''))","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":11941,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 01:53:19","func_code":"def count_letters(string):\n if not string:\n return 0\n else:\n return 1 + count_letters(string.replace(string[0], ''))","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":false} +{"submission_id":17297,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:24:21","func_code":"def count_letters(string):\n if not string:\n return 0\n else:\n return 1 + count_letters(string.replace(string[0], '', 1))","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":10149,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:24:21","func_code":"def count_letters(string):\n if not string:\n return 0\n else:\n return 1 + count_letters(string.replace(string[0], '', 1))","func_name":"count_letters","assignment_id":"count_letters","academic_year":2016,"module":"ca117","description":"Return the number of lettres in a string.","test":"assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13","correct":true} +{"submission_id":877,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:32:55","func_code":"def reverse_list(list):\n if not list:\n return list\n else:\n return list[-1] + reverse_list(list)","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":26877,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:56:17","func_code":"def reverse_list(listt):\n if not listt:\n return listt\n else:\n return list(listt[-1]) + reverse_list(listt[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":false} +{"submission_id":36753,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:59:45","func_code":"def reverse_list(listt):\n if not listt:\n return listt\n else:\n return [listt[-1]] + reverse_list(listt[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":4690,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:59:45","func_code":"def reverse_list(listt):\n if not listt:\n return listt\n else:\n return [listt[-1]] + reverse_list(listt[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":17328,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-23 02:59:45","func_code":"def reverse_list(listt):\n if not listt:\n return listt\n else:\n return [listt[-1]] + reverse_list(listt[:-1])","func_name":"reverse_list","assignment_id":"reverse_recur","academic_year":2016,"module":"ca117","description":"Recursively reverse a list of elements.","test":"assert reverse_list([])==[] and reverse_list([0])==[0] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457, 85, -74, -10050, 787, -3])==[-3, 787, -10050, -74, 85, -109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650] and reverse_list([0, 0])==[0, 0] and reverse_list([85, -74, -10050, 787, 9650, 12103, -1947378123, -109345868112896702250879906349988323457, -3])==[-3, -109345868112896702250879906349988323457, -1947378123, 12103, 9650, 787, -10050, -74, 85] and reverse_list([85, -74, -10050, 787, -3, 9650, 12103, -1947378123, -109345868112896702250879906349988323457])==[-109345868112896702250879906349988323457, -1947378123, 12103, 9650, -3, 787, -10050, -74, 85]","correct":true} +{"submission_id":17465,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-05-26 12:00:55","func_code":"def selection_sort(a):\n for i in range(len(a)):\n least = i\n for k in range(i + 1, len(a)):\n if a[k] < a[least]:\n least = k\n tmp = a[i]\n a[i] = a[k]\n a[k] = tmp","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":11029,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-05-26 12:06:54","func_code":"def selection_sort(a):\n for i in range(len(a)):\n mini = min(a[i:])\n min_index = a[i:].index(mini)\n a[i + min_index] = a[i]\n a[i] = mini\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":30961,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-05-26 12:07:52","func_code":"def selection_sort(a):\n for i in range(len(a)):\n mini = min(a[i:])\n min_index = a[i:].index(mini)\n a[i + min_index] = a[i]\n a[i] = mini\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":12824,"user":"f5dc8223-cf9e-429f-aae8-350d82da1982","date":"2017-05-26 12:07:52","func_code":"def selection_sort(a):\n for i in range(len(a)):\n mini = min(a[i:])\n min_index = a[i:].index(mini)\n a[i + min_index] = a[i]\n a[i] = mini\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":23102,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-28 01:26:33","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":21899,"user":"a49f3af8-fb92-43d5-945c-abc11916e319","date":"2017-05-28 01:26:33","func_code":"def fibonacci(n):\n if n == 0 or n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)","func_name":"fibonacci","assignment_id":"fibonacci_recur","academic_year":2016,"module":"ca117","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657","correct":false} +{"submission_id":15927,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:44:32","func_code":"def square_perimeter(x):\n return x * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31765,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:44:32","func_code":"def circle_area(r):\n return r * r * 3.141","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37525,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:44:32","func_code":"def rectangle_perimeter(x, y):\n return 2 * x + 2 * y","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10598,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:44:32","func_code":"def circle_circumference(r):\n return 2 * 3.14 * r","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18466,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:47:19","func_code":"def square_perimeter(x):\n return x * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4216,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:47:19","func_code":"def circle_circumference(r):\n return 2 * 3.14 * r","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":8609,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:47:19","func_code":"def square_area(x, y):\n area = x * y\n if 0 <= area:\n return area\n else:\n return -area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32860,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:47:19","func_code":"def circle_area(r):\n return r * r * 3.141","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11483,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:47:19","func_code":"def rectangle_perimeter(x, y):\n return 2 * x + 2 * y","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":859,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:48:52","func_code":"def circle_circumference(r):\n return 2 * 3.14 * r","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31590,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:48:52","func_code":"def circle_area(r):\n return r * r * 3.141","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6952,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:48:52","func_code":"def square_perimeter(x):\n return x * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20910,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:48:52","func_code":"def rectangle_perimeter(x, y):\n return 2 * x + 2 * y","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":36936,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:48:52","func_code":"def square_area(x):\n area = x * x\n return area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5921,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:49:10","func_code":"def rectangle_perimeter(x, y):\n return 2 * x + 2 * y","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6127,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:49:10","func_code":"def square_area(x):\n area = x * x\n return area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28837,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:49:10","func_code":"def square_perimeter(x):\n return x * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38533,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:49:10","func_code":"def circle_area(r):\n return r * r * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28204,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:49:10","func_code":"def circle_circumference(r):\n return 2 * 3.14 * r","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14863,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:49:10","func_code":"def square_perimeter(x):\n return x * 4","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13425,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:49:10","func_code":"def circle_area(r):\n return r * r * 3.14","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22523,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:49:10","func_code":"def square_area(x):\n area = x * x\n return area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":26447,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:49:10","func_code":"def circle_circumference(r):\n return 2 * 3.14 * r","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9227,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-05 10:49:10","func_code":"def rectangle_perimeter(x, y):\n return 2 * x + 2 * y","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2336,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-13 14:17:19","func_code":"def reverse(a):\n print(a[::-1])","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":16,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-13 14:19:22","func_code":"def reverse(a):\n print(a.reverse())","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":29153,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-13 14:19:39","func_code":"def reverse(a):\n return a.reverse()","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":3867,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-13 14:20:01","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":36462,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-13 14:20:01","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":9604,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-14 15:50:03","func_code":"def square_area(x):\n return x ** 2","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35587,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-14 15:50:03","func_code":"def square_area(x):\n return x ** 2","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11708,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-07-14 15:50:03","func_code":"def square_area(x):\n return x ** 2","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15806,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 12:55:58","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":7532,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 12:56:16","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":28657,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 12:58:56","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":18439,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 12:59:43","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":16883,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 12:59:43","func_code":"def double(x):\n y = x * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37667,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 13:06:49","func_code":"def area(r):\n y = pi * r * r\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4080,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 13:06:49","func_code":"def area(r):\n y = pi * r * r\n return y","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":8733,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 13:06:49","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":14569,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 13:06:49","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":5911,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 13:13:21","func_code":"def swap(a, i, j):\n y = a[j]\n a[j] = a[i]\n a[i] = y\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":29533,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 13:13:21","func_code":"def swap(a, i, j):\n y = a[j]\n a[j] = a[i]\n a[i] = y\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":15931,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-07-19 13:13:21","func_code":"def swap(a, i, j):\n y = a[j]\n a[j] = a[i]\n a[i] = y\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":10186,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:34:55","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":12529,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:35:41","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":36067,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:36:26","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":28590,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:36:50","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":3697,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:37:33","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":13169,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:38:21","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":8705,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:41:25","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":30215,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:41:53","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":31883,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:43:17","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":4919,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:44:23","func_code":"def append2list(l1, l2=[]):\n l2 = l1\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":19827,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:46:03","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n if len(l2) <= 2:\n l2.append(i)\n else:\n l2 = l1\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":8034,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 18:58:51","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n if len(l2) <= 2:\n l2.append(i)\n else:\n l2 = l1\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":21865,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:01:00","func_code":"def append2list(l1, l2=None):\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":32284,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:02:19","func_code":"def append2list(l1, l2=None):\n for i in l1:\n try:\n l2.append(i)\n except AttributeError:\n continue\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":12083,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:02:41","func_code":"def append2list(l1, l2):\n for i in l1:\n try:\n l2.append(i)\n except AttributeError:\n continue\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":24381,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:02:53","func_code":"def append2list(l1, l2=''):\n for i in l1:\n try:\n l2.append(i)\n except AttributeError:\n continue\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":12268,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:03:16","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n try:\n l2.append(i)\n except AttributeError:\n continue\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":20115,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:03:48","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n try:\n l1 = []\n l2.append(i)\n except AttributeError:\n continue\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":6012,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:04:11","func_code":"def append2list(l1, l2=[]):\n for i in l1:\n try:\n l1 = []\n l2 = []\n l2.append(i)\n except AttributeError:\n continue\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":false} +{"submission_id":20205,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:28:12","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":11443,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:28:12","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":25337,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-25 19:28:12","func_code":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2","func_name":"append2list","assignment_id":"append2list","academic_year":2016,"module":"ca117","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]","correct":true} +{"submission_id":34174,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 20:22:45","func_code":"def swap_keys_values(d):\n dictionary = {}\n for k, v in list(d.items()):\n dictionary[v] = k\n return dictionary","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":14888,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 20:22:45","func_code":"def swap_keys_values(d):\n dictionary = {}\n for k, v in list(d.items()):\n dictionary[v] = k\n return dictionary","func_name":"swap_keys_values","assignment_id":"swap_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its values.","test":"assert swap_keys_values({})=={} and swap_keys_values({'1': 'a'})=={'a': '1'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'a': '3', 'b': '2'}","correct":true} +{"submission_id":18926,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 21:37:17","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = set(d.values())\n for k, v in list(d.items()):\n if v in unique:\n dictionary[v] = k\n return dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":15951,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 21:42:02","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n print(unique)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":41353,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 22:38:03","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n for k, v in unique:\n if unique.count(v) > 1:\n del unique[k, v]\n print(unique)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":36838,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 22:39:36","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n for k, v in unique:\n print(v)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":37746,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 22:40:17","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n for k, v in unique:\n if unique.count(v) > 1:\n print(v)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":22039,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 22:44:10","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n for k, v in unique:\n if unique.count(v) > 1:\n print(v)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":21251,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 22:44:10","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n for k, v in unique:\n if unique.count(v) > 1:\n print(v)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":2566,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-29 22:44:10","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n for k, v in list(d.items()):\n unique.append((k, v))\n for k, v in unique:\n if unique.count(v) > 1:\n print(v)","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":27923,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-30 00:07:49","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n deli = []\n for k, v in list(d.items()):\n unique.append(v)\n for v in unique:\n if unique.count(v) > 1:\n deli.append(v)\n for v in unique:\n if v in deli:\n del unique[v]\n for k, v in list(d.items()):\n if v in unique:\n dictionary[v] = k\n return dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":27040,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-30 00:09:23","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n unique = []\n deli = []\n for k, v in list(d.items()):\n unique.append(v)\n for v in unique:\n if unique.count(v) > 1:\n deli.append(v)\n for v in unique:\n try:\n if v in deli:\n del unique[v]\n except:\n continue\n for k, v in list(d.items()):\n if v in unique:\n dictionary[v] = k\n return dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":false} +{"submission_id":29070,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-30 01:10:18","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n counter = []\n new = []\n for k, v in list(d.items()):\n counter.append(v)\n for c in counter:\n if counter.count(c) == 1:\n new.append(c)\n for k, v in list(d.items()):\n if v in new:\n dictionary[v] = k\n return dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":30599,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-07-30 01:10:18","func_code":"def swap_unique_keys_values(d):\n dictionary = {}\n counter = []\n new = []\n for k, v in list(d.items()):\n counter.append(v)\n for c in counter:\n if counter.count(c) == 1:\n new.append(c)\n for k, v in list(d.items()):\n if v in new:\n dictionary[v] = k\n return dictionary","func_name":"swap_unique_keys_values","assignment_id":"swap_unique_keys_values","academic_year":2016,"module":"ca117","description":"Swap the keys of a dictionary with its unique values.","test":"assert swap_unique_keys_values({})=={} and swap_unique_keys_values({'1': 'a'})=={'a': '1'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'c', '4': 'd'})=={'a': '1', 'b': '2', 'c': '3', 'd': '4'} and swap_unique_keys_values({'1': 'a', '2': 'b', '3': 'a'})=={'b': '2'}","correct":true} +{"submission_id":4678,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-08-11 14:12:10","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39342,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-08-11 14:12:10","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":22209,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-08-11 14:16:00","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19450,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-08-11 14:16:00","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":20644,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-08-11 14:16:00","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":598,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-08-11 14:16:00","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":14132,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-08-11 14:16:00","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4713,"user":"11fcbbcf-716f-4e92-ab7c-407d4712c9e8","date":"2017-08-11 14:16:00","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15821,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-18 15:17:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40507,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-18 15:17:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":25705,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-18 15:19:28","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":21731,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-18 15:19:28","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":17839,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 21:59:14","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":23230,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 22:01:27","func_code":"def swap(a, i, j):\n for k in a:\n a[i], a[j] = a[j], a[i]\n return a\n\n\ndef reverse(a):\n return swap(a)","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":14842,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 22:12:11","func_code":"def reverse(a):\n return [i for i in range(len(a), 0, -1)]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":33187,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 22:18:19","func_code":"def reverse(a):\n new = []\n for i in a.__reversed__():\n new.append(i)\n return new","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":13173,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 22:31:23","func_code":"def swap(a, i='', j=''):\n if i == '' and j == '':\n i = 0\n j = len(a) - 1\n k = 0\n while k < len(a) \/ 2:\n a[i], a[j] = a[j], a[i]\n i += 1\n j -= 1\n k += 1\n else:\n a[i], a[j] = a[j], a[i]\n return a\n\n\ndef reverse(a):\n return swap(a)","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":16424,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 22:31:23","func_code":"def swap(a, i='', j=''):\n if i == '' and j == '':\n i = 0\n j = len(a) - 1\n k = 0\n while k < len(a) \/ 2:\n a[i], a[j] = a[j], a[i]\n i += 1\n j -= 1\n k += 1\n else:\n a[i], a[j] = a[j], a[i]\n return a\n\n\ndef reverse(a):\n return swap(a)","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":36000,"user":"a72d6534-1b96-4a41-95a5-f71f23e2bd99","date":"2017-08-18 22:31:23","func_code":"def swap(a, i='', j=''):\n if i == '' and j == '':\n i = 0\n j = len(a) - 1\n k = 0\n while k < len(a) \/ 2:\n a[i], a[j] = a[j], a[i]\n i += 1\n j -= 1\n k += 1\n else:\n a[i], a[j] = a[j], a[i]\n return a\n\n\ndef reverse(a):\n return swap(a)","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":20758,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 15:59:12","func_code":"def double(n):\n return n * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19840,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 15:59:50","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":42131,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 15:59:50","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":16466,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:03:28","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":18398,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:03:28","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4038,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:04:09","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":30041,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:04:09","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":40876,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:04:09","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":6239,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:04:09","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":5647,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:09:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":22005,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:09:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":10359,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:14:32","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = j + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":8227,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:37:26","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":27779,"user":"fe81d9d2-29fa-4a6b-abc0-109c9697b557","date":"2017-08-19 16:37:26","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":36664,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:27:43","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":9828,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:27:43","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37853,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:30:37","func_code":"def area(radius):\n return pi * radius ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25057,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:30:37","func_code":"def area(radius):\n return pi * radius ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19005,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:30:37","func_code":"def circumference(radius):\n return 2 * pi * radius","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":17434,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:30:37","func_code":"def circumference(radius):\n return 2 * pi * radius","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37769,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:33:25","func_code":"def reverse():\n a = a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":6530,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:33:45","func_code":"def reverse(a):\n a = a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":34372,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:35:15","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":8239,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:36:03","func_code":"def reverse(b):\n a = b[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":2798,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:36:52","func_code":"def reverse(b):\n print(a[::-1])","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":19087,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:38:49","func_code":"def reverse(a):\n a = a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":11017,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:41:32","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":27245,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:42:38","func_code":"def reverse(a):\n print(a[::-1])","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":3661,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:44:14","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":3446,"user":"caddc359-e5b0-41d8-94ab-df712d5ea9ce","date":"2017-08-30 01:44:14","func_code":"def reverse(a):\n return a[::-1]","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":2858,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-10-02 10:34:10","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":20395,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-10-02 10:34:10","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":31887,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 13:36:52","func_code":"def square_area(side):\n result = side * side\n return result","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11211,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 13:36:52","func_code":"def square_area(side):\n result = side * side\n return result","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":21974,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 13:59:40","func_code":"def square_area(n):\n sa = n * n\n return sa","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6350,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 13:59:40","func_code":"def rectangle_perimeter(n, a):\n rp = n + n + a + a\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":30238,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 13:59:40","func_code":"def circle_area(n):\n ca = 2 * 3.14 * n\n return cc","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22375,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 13:59:40","func_code":"def square_perimeter(n):\n sa = n * 4\n return sp","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32234,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:10","func_code":"def rectangle_perimeter(n, a):\n rp = n + n + a + a\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42382,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:10","func_code":"def circle_area(n):\n cc = 2 * 3.14 * n\n return cc","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28663,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:10","func_code":"def square_area(n):\n sa = n * n\n return sa","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":8098,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:10","func_code":"def square_perimeter(n):\n sp = n * 4\n return sp","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13068,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:57","func_code":"def circle_circumference(n):\n cc = 2 * 3.14 * n\n return cc","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40398,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:57","func_code":"def rectangle_perimeter(n, a):\n rp = n + n + a + a\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29338,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:57","func_code":"def square_area(n):\n sa = n * n\n return sa","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4884,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:57","func_code":"def square_perimeter(n):\n sp = n * 4\n return sp","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13057,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:57","func_code":"def square_area(n):\n sa = n * n\n return sa","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39817,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:57","func_code":"def square_perimeter(n):\n sp = n * 4\n return sp","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4314,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:57","func_code":"def circle_area(n):\n ca = 3.14 * (n * n)\n return ca","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17732,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:57","func_code":"def circle_circumference(n):\n cc = 2 * 3.14 * n\n return cc","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28066,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:57","func_code":"def rectangle_perimeter(n, a):\n rp = n + n + a + a\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25309,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:00:57","func_code":"def circle_area(n):\n ca = 3.14 * (n * n)\n return ca","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":36265,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:01:04","func_code":"def square_area(n):\n sa = n + n\n return sa","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14349,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:01:19","func_code":"def square_area(n):\n sa = n * n\n return sa","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27241,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:01:19","func_code":"def square_area(n):\n sa = n * n\n return sa","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":21130,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:09:44","func_code":"def circle_circumference(radius):\n result = 2 * 3.14 * radius\n return result","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11730,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:09:44","func_code":"def square_area(side):\n result = side * side\n return result","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11099,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:09:44","func_code":"def rectangle_perimeter(length, height):\n result = 2 * length + 2 * height\n return result","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18300,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:09:44","func_code":"def circle_area(radius):\n result = 3.14 * (radius * radius)\n return result","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40893,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:11:06","func_code":"def square_area(side):\n result = side * side\n return result","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11512,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:11:06","func_code":"def square_perimeter(side):\n result = side * 4\n return result","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12192,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:11:06","func_code":"def rectangle_perimeter(length, height):\n result = 2 * length + 2 * height\n return result","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10983,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:11:06","func_code":"def square_area(side):\n result = side * side\n return result","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25243,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:11:06","func_code":"def circle_area(radius):\n result = 3.14 * (radius * radius)\n return result","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16140,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:11:06","func_code":"def circle_circumference(radius):\n result = 2 * 3.14 * radius\n return result","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2080,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:11:06","func_code":"def circle_circumference(radius):\n result = 2 * 3.14 * radius\n return result","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":26454,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:11:06","func_code":"def square_perimeter(side):\n result = side * 4\n return result","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37222,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:11:06","func_code":"def rectangle_perimeter(length, height):\n result = 2 * length + 2 * height\n return result","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41185,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-02 14:11:06","func_code":"def circle_area(radius):\n result = 3.14 * (radius * radius)\n return result","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12938,"user":"2d5a247c-29b2-4cc2-a956-669a2206edc8","date":"2017-10-02 14:19:55","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9621,"user":"2d5a247c-29b2-4cc2-a956-669a2206edc8","date":"2017-10-02 14:19:55","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4943,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:30:16","func_code":"def sort(a):\n i = 0","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":20535,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:36:34","func_code":"def sort(a):\n i = 0\n p = 0\n while i < len(a):\n if a[i] < a[p]:\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":33789,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:37:36","func_code":"def sort(a):\n i = 0\n p = 0\n while i < len(a):\n if a[i] > a[p]:\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":18182,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:38:09","func_code":"def sort(a):\n i = 0\n p = 0\n while i < len(a):\n if a[i] < a[p]:\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":33466,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 14:39:45","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":40250,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 14:41:04","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":12736,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 14:43:03","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":12556,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 14:43:39","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":20357,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 14:45:37","func_code":"def find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n find_position_of_smallest(a, i)\n a[0] = tmp","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":10558,"user":"3bb099c4-4248-4efd-bfe2-3c423b916ce0","date":"2017-10-02 14:46:00","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":8441,"user":"d2330156-60dd-4aca-a925-9aa27e3edb48","date":"2017-10-02 14:46:05","func_code":"def sort(a):\n i = 0","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":25547,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 14:46:06","func_code":"def find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n find_position_of_smallest(a, i)\n tmp = i\n a[0] = tmp","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":29197,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 14:46:21","func_code":"def find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n find_position_of_smallest(a, i)\n i = tmp\n a[0] = tmp","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":4899,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:47:56","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":11719,"user":"d31360b5-795b-45df-bd6f-a99df2683eae","date":"2017-10-02 14:48:07","func_code":"def sort(a):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":41457,"user":"d2330156-60dd-4aca-a925-9aa27e3edb48","date":"2017-10-02 14:48:35","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":40405,"user":"d2330156-60dd-4aca-a925-9aa27e3edb48","date":"2017-10-02 14:48:35","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":23408,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:48:51","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":20240,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:49:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, tmp)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":5181,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:49:50","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":28457,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:50:07","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n j = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":4158,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:51:20","func_code":"def sort(a):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":28796,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-10-02 14:51:30","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n track = 0\n tempnum = a[i + track]\n while track != len(a) - i:\n if a[i + track] == tempnum:\n tempnum = a[i + track]\n track = track + 1\n return tempnum\n\n\ndef sort(a):\n i = 0\n j = 0\n while i != len(a):\n j = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":30717,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 14:52:03","func_code":"def sort(a):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":19786,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 14:52:18","func_code":"def find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n find_position_of_smallest(a, i)\n i = tmp\n a[0] = tmp","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":39836,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:52:28","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n if a[i] < a[p]:\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":3336,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-10-02 14:53:28","func_code":"def sort(a):\n i = 0\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":41274,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:53:37","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n if a[i] < a[p]:\n tmp = a[i]\n a[i] = a[p]\n a[p] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":18833,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-10-02 14:53:41","func_code":"def sort(a):\n i = 0\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":22434,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:54:08","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n if a[i] < a[p]:\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":36815,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-02 14:54:30","func_code":"def sort(a):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":3318,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 14:56:33","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":10324,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:56:52","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n j = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":27012,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 14:58:16","func_code":"def sort(a):\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":10556,"user":"4490d043-a9e0-48aa-a62c-ddcc67ed7fba","date":"2017-10-02 14:58:24","func_code":"def sort(a):\n i = 0","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":24101,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:58:44","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n j = 0\n while j < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n find_position_of_smallest","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":29545,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-02 14:58:45","func_code":"def sort(a):\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":2655,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 14:58:53","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n j = 0\n while j < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":39750,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 14:59:04","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":35512,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-02 14:59:15","func_code":"def sort(a):\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":18492,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 14:59:35","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n swap(a, i, j)\n j = j + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":36293,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-02 14:59:51","func_code":"def sort(a):\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":18868,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-10-02 15:00:26","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":31029,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 15:00:31","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, j)\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":42403,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:00:55","func_code":"def sort(a):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":13505,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-02 15:01:06","func_code":"def sort(a):\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":20574,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-10-02 15:01:35","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n track = 0\n tempnum = a[i + track]\n while track != len(a) - i:\n if a[i + track] < tempnum:\n tempnum = a[i + track]\n track = track + 1\n return track + i - 1\n\n\ndef sort(a):\n i = 0\n j = 0\n while i != len(a):\n j = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":3199,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 15:01:37","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":32981,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 15:01:51","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":22944,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-10-02 15:01:51","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38420,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 15:02:00","func_code":"def sort(a):\n p = i\n j = i + 1\n i = 0\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":26098,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 15:02:25","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n swap(a, i, j)\n j = j + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":30167,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:02:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n j = 0\n while j < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":27658,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:02:52","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return k","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":1739,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-02 15:03:13","func_code":"def sort(a):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":15429,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:03:13","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return k","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":20897,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:03:15","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n i = 0\n j = 0\n while j < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":17136,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:03:28","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return k","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":15207,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:04:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":17349,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:04:50","func_code":"def sort(a):\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":30984,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:05:11","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":4265,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:05:20","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":6782,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:05:33","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":36004,"user":"1952771b-859e-46c9-8146-448dc8ef5870","date":"2017-10-02 15:05:33","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":9719,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-02 15:06:23","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":5460,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-02 15:06:23","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38159,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:06:30","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":30872,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:06:45","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":24975,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:07:24","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[k]\n a[k] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":370,"user":"d31360b5-795b-45df-bd6f-a99df2683eae","date":"2017-10-02 15:07:35","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":8690,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:07:40","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":10393,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-02 15:08:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":9273,"user":"6aa0e790-273f-4239-98eb-0b504997b70b","date":"2017-10-02 15:08:04","func_code":"def sort(a):\n i = 0","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":22725,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 15:08:12","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":6402,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-02 15:08:12","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":33689,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 15:08:24","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":3593,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 15:08:25","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":6465,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 15:08:38","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":15922,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-02 15:08:38","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":7290,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:08:59","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":32747,"user":"d31360b5-795b-45df-bd6f-a99df2683eae","date":"2017-10-02 15:09:07","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":23568,"user":"d31360b5-795b-45df-bd6f-a99df2683eae","date":"2017-10-02 15:09:07","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":33575,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:09:09","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":13866,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 15:09:18","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":14825,"user":"4490d043-a9e0-48aa-a62c-ddcc67ed7fba","date":"2017-10-02 15:09:49","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":21672,"user":"4490d043-a9e0-48aa-a62c-ddcc67ed7fba","date":"2017-10-02 15:09:49","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":40576,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 15:10:38","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":24100,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 15:11:12","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":755,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-02 15:11:12","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":348,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:12:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":14614,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:12:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":39204,"user":"5ba5010e-c0ac-4560-9fa6-aadbc278c3f8","date":"2017-10-02 15:14:13","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":5012,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:14:37","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":2708,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-02 15:14:48","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":20670,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-02 15:14:48","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":21833,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-02 15:14:48","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":33500,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-10-02 15:16:11","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n tempnum = i\n while i + 1 != len(a):\n if a[i] < a[tempnum]:\n tempnum = i\n i = i + 1\n return tempnum\n\n\ndef sort(a):\n i = 0\n j = 0\n while i != len(a):\n j = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38753,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:16:36","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38265,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-02 15:16:36","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":41437,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-10-02 15:17:46","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n tempnum = i\n while i != len(a):\n if a[i] < a[tempnum]:\n tempnum = i\n i = i + 1\n return tempnum\n\n\ndef sort(a):\n i = 0\n j = 0\n while i != len(a):\n j = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":255,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-02 15:17:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":15737,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-02 15:17:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":17526,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-02 15:17:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":32611,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:17:48","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":18901,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-10-02 15:18:04","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n tempnum = i\n while i != len(a):\n if a[i] < a[tempnum]:\n tempnum = i\n i = i + 1\n return tempnum\n\n\ndef sort(a):\n i = 0\n j = 0\n while i != len(a):\n j = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":11078,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-10-02 15:18:04","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n tempnum = i\n while i != len(a):\n if a[i] < a[tempnum]:\n tempnum = i\n i = i + 1\n return tempnum\n\n\ndef sort(a):\n i = 0\n j = 0\n while i != len(a):\n j = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":19624,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:18:18","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n swap\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":14646,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:18:37","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":37818,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:20:23","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":31425,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:20:49","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":37353,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-02 15:21:05","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n temp = a[p]\n a[p] = a[i]\n a[i] = temp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":40442,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:21:14","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":18090,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:21:42","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":32573,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-02 15:22:11","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":35980,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-02 15:22:11","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":18554,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-02 15:22:11","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":24013,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:22:17","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = 0\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":1226,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-02 15:22:39","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":21950,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-02 15:22:39","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":25733,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:22:40","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":19319,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-02 15:23:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, j, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":1808,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:23:09","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":17087,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-02 15:23:52","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":18100,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-02 15:23:52","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":30616,"user":"5bdd4d7a-504a-4b32-ac06-c9d0e6adb55a","date":"2017-10-02 15:24:04","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":36172,"user":"5bdd4d7a-504a-4b32-ac06-c9d0e6adb55a","date":"2017-10-02 15:24:04","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38298,"user":"5bdd4d7a-504a-4b32-ac06-c9d0e6adb55a","date":"2017-10-02 15:24:04","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":11827,"user":"7d0d82bd-2bdb-48da-a37f-ffa6ee59d960","date":"2017-10-02 15:24:13","func_code":"def find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":3774,"user":"7d0d82bd-2bdb-48da-a37f-ffa6ee59d960","date":"2017-10-02 15:24:13","func_code":"def find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":17059,"user":"7d0d82bd-2bdb-48da-a37f-ffa6ee59d960","date":"2017-10-02 15:24:13","func_code":"def find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":11264,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 15:24:36","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":27915,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:24:41","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n find_position - of - smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":8146,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 15:24:54","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":34828,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:24:56","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":1154,"user":"e5dedf13-336d-484f-81bc-d7898f0f002e","date":"2017-10-02 15:24:59","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n while i < len(a):\n p = find_first_position_of_smallest(a, i)\n swap(a, j, i)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":29688,"user":"3aed57e0-c2a2-49b2-afaf-23d3d77478fb","date":"2017-10-02 15:25:04","func_code":"def find_position_of_smallest(a, i):\n x = i\n while i < len(a):\n if a[i] < a[x]:\n x = i\n i = i + 1\n return x\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":35235,"user":"3aed57e0-c2a2-49b2-afaf-23d3d77478fb","date":"2017-10-02 15:25:04","func_code":"def find_position_of_smallest(a, i):\n x = i\n while i < len(a):\n if a[i] < a[x]:\n x = i\n i = i + 1\n return x\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":27109,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 15:25:13","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n p = i\n find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":31507,"user":"6aa0e790-273f-4239-98eb-0b504997b70b","date":"2017-10-02 15:25:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":21806,"user":"edfafe89-fb39-4804-a616-a60af6a9fb7e","date":"2017-10-02 15:25:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":26343,"user":"edfafe89-fb39-4804-a616-a60af6a9fb7e","date":"2017-10-02 15:25:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":17273,"user":"edfafe89-fb39-4804-a616-a60af6a9fb7e","date":"2017-10-02 15:25:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":9848,"user":"6aa0e790-273f-4239-98eb-0b504997b70b","date":"2017-10-02 15:25:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":22429,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:25:47","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":24153,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-02 15:26:39","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":30913,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-02 15:26:39","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":37373,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-02 15:26:39","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":33559,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 15:26:47","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n p = i\n find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":26033,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:26:56","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":13999,"user":"bdc790c5-9f6f-4907-83fb-bb9c00cbd2d1","date":"2017-10-02 15:27:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38452,"user":"bdc790c5-9f6f-4907-83fb-bb9c00cbd2d1","date":"2017-10-02 15:27:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":41464,"user":"bdc790c5-9f6f-4907-83fb-bb9c00cbd2d1","date":"2017-10-02 15:27:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":5160,"user":"169d7a9e-d0dd-4e8b-937d-fcd76c099acc","date":"2017-10-02 15:27:05","func_code":"def sort(a):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":42114,"user":"b9519383-96f3-4fcc-b33f-df67f186ba78","date":"2017-10-02 15:27:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n smallest = i\n while i < len(a):\n if a[i] < a[smallest]:\n smallest = i\n i = i + 1\n return smallest\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":28393,"user":"b9519383-96f3-4fcc-b33f-df67f186ba78","date":"2017-10-02 15:27:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n smallest = i\n while i < len(a):\n if a[i] < a[smallest]:\n smallest = i\n i = i + 1\n return smallest\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":3191,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:27:51","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":32368,"user":"e5dedf13-336d-484f-81bc-d7898f0f002e","date":"2017-10-02 15:27:58","func_code":"def sort(a):\n i = 0","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38847,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:28:17","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":30698,"user":"9de68f60-663e-4929-b3e2-88948f90a669","date":"2017-10-02 15:28:17","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":28468,"user":"0f1cbd69-016d-4739-b232-fed37e5676ad","date":"2017-10-02 15:28:27","func_code":"def sort(a):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":40305,"user":"0f1cbd69-016d-4739-b232-fed37e5676ad","date":"2017-10-02 15:28:53","func_code":"def sort(p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":16076,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:29:21","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":8110,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-02 15:29:21","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":16502,"user":"5ba5010e-c0ac-4560-9fa6-aadbc278c3f8","date":"2017-10-02 15:29:30","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":8168,"user":"0f1cbd69-016d-4739-b232-fed37e5676ad","date":"2017-10-02 15:29:42","func_code":"def sort(p):\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":37332,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-10-02 15:29:57","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":35555,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-10-02 15:29:57","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":17619,"user":"5ba5010e-c0ac-4560-9fa6-aadbc278c3f8","date":"2017-10-02 15:30:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":42199,"user":"5ba5010e-c0ac-4560-9fa6-aadbc278c3f8","date":"2017-10-02 15:30:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38999,"user":"3bb099c4-4248-4efd-bfe2-3c423b916ce0","date":"2017-10-02 15:30:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":23723,"user":"3bb099c4-4248-4efd-bfe2-3c423b916ce0","date":"2017-10-02 15:30:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":27744,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 15:30:34","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":8177,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-10-02 15:30:34","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":2353,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:31:46","func_code":"def find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":32017,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-02 15:32:08","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":32309,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-02 15:32:08","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":14763,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-02 15:32:08","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":18276,"user":"e5dedf13-336d-484f-81bc-d7898f0f002e","date":"2017-10-02 15:32:13","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":33185,"user":"e5dedf13-336d-484f-81bc-d7898f0f002e","date":"2017-10-02 15:32:13","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":31391,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:32:49","func_code":"def find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":24965,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:32:49","func_code":"def find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":7826,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-10-02 15:32:49","func_code":"def find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":29660,"user":"161bb8fd-c916-4d4e-a439-1dce6fc8f542","date":"2017-10-02 15:35:13","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":23734,"user":"161bb8fd-c916-4d4e-a439-1dce6fc8f542","date":"2017-10-02 15:35:13","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":6337,"user":"161bb8fd-c916-4d4e-a439-1dce6fc8f542","date":"2017-10-02 15:35:13","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":41623,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-10-02 15:42:41","func_code":"def swap(a, i, j):\n a[i], a[j] = a[j], a[i]\n\n\ndef find_position_of_smallest(a, i):\n l = a[i:]\n s = 0\n j = 0\n while j < len(l):\n if l[j] < l[s]:\n s = j\n j += 1\n return s + len(a) - len(l)\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n smallest = find_position_of_smallest(a, i)\n swap(a, i, smallest)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":8953,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-10-02 15:42:41","func_code":"def swap(a, i, j):\n a[i], a[j] = a[j], a[i]\n\n\ndef find_position_of_smallest(a, i):\n l = a[i:]\n s = 0\n j = 0\n while j < len(l):\n if l[j] < l[s]:\n s = j\n j += 1\n return s + len(a) - len(l)\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n smallest = find_position_of_smallest(a, i)\n swap(a, i, smallest)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":4622,"user":"ac8b6b8f-d93c-46e5-8736-44e36e620908","date":"2017-10-02 15:51:28","func_code":"def sort(a):\n x = int(a[0])\n i = 0\n while i < len(a) - 1:\n if int(a[i]) > int(a[i + 1]):\n x = a[i]\n a[i] = a[i + 1]\n a[i + 1] = x\n i = i + 1\n i = 0\n while i < len(a):\n print(a[i])\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":19674,"user":"ac8b6b8f-d93c-46e5-8736-44e36e620908","date":"2017-10-02 15:52:42","func_code":"def sort(a):\n x = int(a[0])\n i = 0\n while i < len(a) - 1:\n if int(a[i]) > int(a[i + 1]):\n x = a[i]\n a[i] = a[i + 1]\n a[i + 1] = x\n i = i + 1\n i = 0\n while i < len(a):\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":23903,"user":"ac8b6b8f-d93c-46e5-8736-44e36e620908","date":"2017-10-02 15:52:42","func_code":"def sort(a):\n x = int(a[0])\n i = 0\n while i < len(a) - 1:\n if int(a[i]) > int(a[i + 1]):\n x = a[i]\n a[i] = a[i + 1]\n a[i + 1] = x\n i = i + 1\n i = 0\n while i < len(a):\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":17424,"user":"ac8b6b8f-d93c-46e5-8736-44e36e620908","date":"2017-10-02 15:52:42","func_code":"def sort(a):\n x = int(a[0])\n i = 0\n while i < len(a) - 1:\n if int(a[i]) > int(a[i + 1]):\n x = a[i]\n a[i] = a[i + 1]\n a[i + 1] = x\n i = i + 1\n i = 0\n while i < len(a):\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":16379,"user":"4205f21d-1c6e-499a-a25c-83a2d9d5ad93","date":"2017-10-02 20:18:37","func_code":"def sort(a):\n p = 0\n j = 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":36674,"user":"4205f21d-1c6e-499a-a25c-83a2d9d5ad93","date":"2017-10-02 20:21:05","func_code":"def sort(a):\n i = 0","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38523,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-03 15:41:52","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":23754,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-03 15:42:12","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":41574,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-03 15:42:46","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":9738,"user":"161bb8fd-c916-4d4e-a439-1dce6fc8f542","date":"2017-10-03 15:43:33","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":1125,"user":"161bb8fd-c916-4d4e-a439-1dce6fc8f542","date":"2017-10-03 15:43:33","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":12158,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-03 15:43:55","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":9050,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-03 15:43:55","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":13717,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:35:41","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27021,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:35:41","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27755,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:45:02","func_code":"def circle_circumference(n):\n sq = 2 * 3.14 * n\n return sq","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17475,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:45:02","func_code":"def square_perimeter(n):\n sq = n + n + n + n\n return sq","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10373,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:45:02","func_code":"def circle_area(n):\n sq = 3.14 * n ** 2\n return sq","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33874,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:45:02","func_code":"def rectangle_perimeter(n, b):\n sq = n + n + b + b\n return sq","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28950,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:48:05","func_code":"def square_perimeter(n):\n sq = n + n + n + n\n return sq","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4718,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:48:05","func_code":"def circle_area(n):\n sq = 3.14 * n ** 2\n return sq","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34952,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:48:05","func_code":"def square_perimeter(n):\n sq = n + n + n + n\n return sq","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":24637,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:48:05","func_code":"def circle_area(n):\n sq = 3.14 * n ** 2\n return sq","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25564,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:48:05","func_code":"def circle_circumference(n):\n sq = 2 * 3.14 * n\n return sq","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16630,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:48:05","func_code":"def rectangle_perimeter(n, b):\n sq = n + n + b + b\n return sq","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11073,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:48:05","func_code":"def rectangle_perimeter(n, b):\n sq = n + n + b + b\n return sq","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42197,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:48:05","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22972,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:48:05","func_code":"def circle_circumference(n):\n sq = 2 * 3.14 * n\n return sq","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38992,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-03 17:48:05","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42484,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:08:25","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40079,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:10:47","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6424,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:11:38","func_code":"def circle_circumference(r):\n circum = 2 * 3.14 * r\n return circum","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29684,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:11:38","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29962,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:11:38","func_code":"def square_perimeter(side):\n perimeter = side * 4\n return perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25950,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:11:38","func_code":"def circle_area(r):\n cir = 3.14 * (r * r)\n return cir","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1048,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:11:53","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34168,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:11:53","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41539,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:13:59","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31939,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:13:59","func_code":"def circle_area(r):\n cir = 3.14 * (r * r)\n return cir","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4604,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:13:59","func_code":"def rectangle_perimeter(a, b):\n per = a * 2 + b * 2\n return per","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12630,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:13:59","func_code":"def rectangle_perimeter(a, b):\n per = a * 2 + b * 2\n return per","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29483,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:13:59","func_code":"def circle_circumference(r):\n circum = 2 * 3.14 * r\n return circum","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40468,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:13:59","func_code":"def square_area(side):\n sq = side * side\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13293,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:13:59","func_code":"def circle_area(r):\n cir = 3.14 * (r * r)\n return cir","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42343,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:13:59","func_code":"def circle_circumference(r):\n circum = 2 * 3.14 * r\n return circum","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5218,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:13:59","func_code":"def square_perimeter(side):\n perimeter = side * 4\n return perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28051,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-10-03 20:13:59","func_code":"def square_perimeter(side):\n perimeter = side * 4\n return perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28444,"user":"f40d6a8a-0620-4bda-8c98-4c952edace05","date":"2017-10-04 11:14:35","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":6574,"user":"f40d6a8a-0620-4bda-8c98-4c952edace05","date":"2017-10-04 11:14:35","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":19552,"user":"415d4431-1b98-4241-a978-02dc16bf556e","date":"2017-10-04 11:17:40","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":19152,"user":"415d4431-1b98-4241-a978-02dc16bf556e","date":"2017-10-04 11:18:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":26081,"user":"415d4431-1b98-4241-a978-02dc16bf556e","date":"2017-10-04 11:18:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":37141,"user":"169d7a9e-d0dd-4e8b-937d-fcd76c099acc","date":"2017-10-04 11:20:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":23409,"user":"169d7a9e-d0dd-4e8b-937d-fcd76c099acc","date":"2017-10-04 11:20:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":37343,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:24:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":30918,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 11:25:42","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":2083,"user":"2a1a0a7b-975b-4463-96bb-4f52900ce463","date":"2017-10-04 11:25:52","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n while i < len(a):\n p = find_position_of_smallest\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":25855,"user":"9413c2ae-94cc-4b45-8180-0919de97fe15","date":"2017-10-04 11:27:42","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n i = 0\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38967,"user":"2a1a0a7b-975b-4463-96bb-4f52900ce463","date":"2017-10-04 11:27:45","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n while i < len(a):\n p = find_position_of_smallest\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":28208,"user":"2a1a0a7b-975b-4463-96bb-4f52900ce463","date":"2017-10-04 11:27:45","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n while i < len(a):\n p = find_position_of_smallest\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":7957,"user":"2a1a0a7b-975b-4463-96bb-4f52900ce463","date":"2017-10-04 11:27:45","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n while i < len(a):\n p = find_position_of_smallest\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":33546,"user":"9413c2ae-94cc-4b45-8180-0919de97fe15","date":"2017-10-04 11:28:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n i = p\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":8141,"user":"0f1cbd69-016d-4739-b232-fed37e5676ad","date":"2017-10-04 11:30:25","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":32655,"user":"0f1cbd69-016d-4739-b232-fed37e5676ad","date":"2017-10-04 11:30:25","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":5873,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 11:34:23","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":11860,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:34:44","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10698,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:34:44","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1174,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:34:44","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16435,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:34:44","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41055,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:34:50","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":20367,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:35:02","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38026,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 11:35:11","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":21349,"user":"4490d043-a9e0-48aa-a62c-ddcc67ed7fba","date":"2017-10-04 11:37:03","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":25286,"user":"4490d043-a9e0-48aa-a62c-ddcc67ed7fba","date":"2017-10-04 11:37:03","func_code":"def sort(a):\n i = 0\n while i < len(a):\n j = i\n k = i + 1\n while k < len(a):\n if a[k] < a[j]:\n j = k\n k = k + 1\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":29055,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:37:38","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":30817,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:37:38","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27135,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:37:38","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38206,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:37:38","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5167,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-04 11:38:03","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":15049,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:38:26","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15342,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:38:26","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29434,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:39:40","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37263,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:39:40","func_code":"def rectangle_perimeter(x1, y1, x2, y2):\n dx = x1 - x2\n dy = y1 - y2\n area = dx * dy\n if 0 <= area:\n return area","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32407,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:39:40","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2749,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:39:40","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41913,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:39:40","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1308,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:40:15","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":26943,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:40:15","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23117,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:40:15","func_code":"def rectangle_perimeter(x1, y1, x2, y2):\n dx = x1 - x2\n dy = y1 - y2\n area = dx * dy\n if 0 <= area:\n return area","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34149,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:40:15","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23864,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:40:15","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33497,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:40:58","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n i = 0\n while i < len(a):\n if a[i] < a[j]:\n i = i + 1\n return i\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":37114,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 11:41:18","func_code":"def square_area(n):\n sq = n * n\n return result","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2564,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:41:31","func_code":"def sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":21944,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-04 11:41:33","func_code":"def sort(a):\n p = i + 1\n i = i + 2\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":12930,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:42:37","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = p + 1\n while i < len(a):\n if a[j] < a[p]:\n p = j\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":38868,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 11:42:49","func_code":"def square_area(n):\n sq = n * n\n return result","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28544,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:43:04","func_code":"def sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":27532,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:43:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":14963,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:43:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":11550,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:43:18","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":967,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:43:18","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23391,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:43:18","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33007,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:43:18","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40547,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:43:18","func_code":"def rectangle_perimeter(x1, y1, x2, y2):\n dx = x1 - x2\n dy = y1 - y2\n perimeter = dx * dy\n if 0 <= area:\n return area","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23389,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 11:43:26","func_code":"def square_area(n):\n results = n * n\n return result","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14321,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-04 11:43:35","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":7591,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:43:38","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = p + 1\n while i < len(a):\n if a[p] < a[j]:\n j = p\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":39007,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:43:58","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = p + 1\n while i < len(a):\n if a[p] < a[j]:\n j = p\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":23631,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 11:44:26","func_code":"def square_area(n):\n result = n * n\n return result","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23359,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 11:44:26","func_code":"def square_area(n):\n result = n * n\n return result","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39912,"user":"06043f63-bd06-4b6c-9b40-184b4eca2307","date":"2017-10-04 11:44:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":485,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:45:00","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = p + 1\n while i < len(a):\n if a[j] < a[p]:\n j = p\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":24594,"user":"06043f63-bd06-4b6c-9b40-184b4eca2307","date":"2017-10-04 11:45:04","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":21153,"user":"06043f63-bd06-4b6c-9b40-184b4eca2307","date":"2017-10-04 11:45:04","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i += 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":10319,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:45:16","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":38522,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:45:37","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n i = i + 1\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":39205,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:45:59","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":18448,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-04 11:46:07","func_code":"def sort(a):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":13789,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:46:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = p + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":26129,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:46:55","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":10206,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:47:13","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":1682,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:47:53","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":31927,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:47:55","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n i = i + 1\n tmp = a[p]\n a[p] = a[j]\n a[j] = tmp","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":14133,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-04 11:48:02","func_code":"def sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":11016,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:48:18","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35247,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:48:18","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9012,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:48:18","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18289,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:48:18","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1131,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:48:18","func_code":"def rectangle_perimeter(x1, y1):\n rectancle_perimeter = 2 * x1 * y1\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41187,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:48:36","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31345,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:48:36","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18787,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:48:36","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":19771,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:48:36","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40144,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:48:36","func_code":"def rectangle_perimeter(x1, y1):\n rectancle_perimeter = 2 * x1 * y1\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20102,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 11:48:37","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":3605,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:48:41","func_code":"def square_perimeter(r):\n sqaure_perimeter = r * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6776,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:48:41","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":87,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:48:41","func_code":"def rectangle_perimeter(r, n):\n rectangle_perimeter = (2)(n + r)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14137,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:48:41","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39044,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:48:41","func_code":"def square_area(r):\n square_area = r * r\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40707,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:48:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":40694,"user":"e5f35cd7-8337-4a68-bda3-4164a982feae","date":"2017-10-04 11:48:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1\n return p","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":22776,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-04 11:49:53","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_postion_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":42380,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:50:22","func_code":"def sort(a):\n i = 0\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n i = i + 1\n tmp = a[p]\n a[p] = a[j]\n a[j] = tmp","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":26507,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:50:48","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6253,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:50:48","func_code":"def rectangle_perimeter(x1, y1):\n rectancle_perimeter = 2 * (x1 * y1)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34012,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:50:48","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17918,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:50:48","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39562,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:50:48","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":3080,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:50:56","func_code":"def sort(a):\n i = 0\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n i = i + 1\n tmp = a[p]\n a[i] = a[j]\n a[j] = tmp","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":14395,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:51:32","func_code":"def sort(a):\n i = 0\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":5304,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:51:54","func_code":"def sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":40095,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-04 11:52:25","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_postion_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":8842,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-04 11:52:25","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_postion_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":34265,"user":"fd20892b-e35f-43bc-b82d-e6db9320b8ae","date":"2017-10-04 11:52:25","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_postion_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":34794,"user":"a93c9eeb-104a-4436-bd9a-c2e65d311d9e","date":"2017-10-04 11:54:03","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":20967,"user":"a93c9eeb-104a-4436-bd9a-c2e65d311d9e","date":"2017-10-04 11:54:03","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":30320,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:54:13","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":25094,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:54:26","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":31506,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:55:31","func_code":"def square_perimeter(r):\n sqaure_perimeter = r * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32861,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:55:31","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22853,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:55:31","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":36609,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:55:31","func_code":"def square_area(r):\n square_area = r * r\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34384,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:55:31","func_code":"def rectangle_perimeter(r, n):\n rectangle_perimeter = (2)(r + n)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":19646,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:55:58","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16053,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:55:58","func_code":"def rectangle_perimeter(r, n):\n rectangle_perimeter = (2)(r + n)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41823,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:55:58","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22414,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:55:58","func_code":"def square_perimeter(r):\n sqaure_perimeter = r * r * r * r\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2409,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:55:58","func_code":"def square_area(r):\n square_area = r * r\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10511,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:56:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":26181,"user":"db184e8e-e02b-4772-b74b-547b88d21933","date":"2017-10-04 11:56:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":15450,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:56:17","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":8732,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:56:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":9295,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:56:59","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":8977,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:56:59","func_code":"def rectangle_perimeter(r, n):\n rectangle_perimeter = (2)(r + n)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41209,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:56:59","func_code":"def square_perimeter(r):\n sqaure_perimeter = r * r * r * r\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38095,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:56:59","func_code":"def square_area(r):\n square_area = r * r\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":19828,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:56:59","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34973,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:57:10","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":23746,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:57:18","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18193,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:57:18","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35424,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:57:18","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16207,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:57:18","func_code":"def rectangle_perimeter(x1, y1):\n rectancle_perimeter = 2 * (x1 * y1)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1088,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:57:18","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31394,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:57:34","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":7461,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:58:09","func_code":"def rectangle_perimeter(r, n):\n rectangle_perimeter = (2)(r + n)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42480,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:58:09","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4763,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:58:09","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5735,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:58:09","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35390,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:58:09","func_code":"def square_perimeter(n):\n sqaure_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37305,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-10-04 11:58:28","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort():\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":14153,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-04 11:58:42","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":14305,"user":"762404df-24ca-44ff-9c98-3f841fa7faab","date":"2017-10-04 11:58:42","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":23449,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:58:54","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4954,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:58:54","func_code":"def rectangle_perimeter(x1, y1):\n rectancle_perimeter = (2)(x1 * y1)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9677,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:58:54","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22525,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:58:54","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34010,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 11:58:54","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20790,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-04 11:59:04","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":11807,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-04 11:59:04","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":4134,"user":"12d00542-0a26-4a35-a142-ccd508484c14","date":"2017-10-04 11:59:04","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":5159,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 11:59:05","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":9815,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:59:18","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":25707,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:59:18","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":12197,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-10-04 11:59:18","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":37550,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 11:59:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = i\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":27929,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-10-04 11:59:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":10651,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-10-04 11:59:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":17043,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-10-04 11:59:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":1270,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:59:43","func_code":"def square_perimeter(n):\n sqaure_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27714,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:59:43","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":30711,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:59:43","func_code":"def rectangle_perimeter(r, n):\n rectangle_perimeter = (2)(r + n)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15236,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:59:43","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31791,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 11:59:43","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":30965,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:00:00","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":17766,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 12:00:36","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1\n j = i","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":29160,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:00:46","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14684,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:00:46","func_code":"def square_perimeter(n):\n sqaure_perimeter = (4)(n)\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6811,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:00:46","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29729,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:00:46","func_code":"def rectangle_perimeter(r, n):\n rectangle_perimeter = (2)(r + n)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1902,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:00:46","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13716,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:00:48","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":8639,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:00:48","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41770,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:00:48","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":7176,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:00:48","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11636,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:00:48","func_code":"def rectangle_perimeter(r, n):\n rectancle_perimeter = (2)(r + n)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15119,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:01:02","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n while i < len(a):\n find_position_of_smallest(a, i).swap(a)\n swap(a, i, j).sort(a)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":13842,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 12:01:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":4860,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:01:32","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":14204,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 12:01:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38668,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 12:01:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":5604,"user":"18ee9049-5f05-43b2-ac53-518e3b23c3c3","date":"2017-10-04 12:01:47","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n tmp = i\n while i < len(a):\n if a[i] < a[tmp]:\n tmp = i\n i = i + 1\n return tmp\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":25164,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-04 12:01:48","func_code":"def sort(a):\n while i < len(a):\n find_position_of_smallest.sort(a)\n swap.sort(a)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":12291,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:01:53","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n j = i + 1\n while j < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":19251,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-04 12:02:12","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":36990,"user":"d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb","date":"2017-10-04 12:02:12","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38617,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-04 12:02:14","func_code":"def sort(a):\n i = 0\n while i < len(a):\n find_position_of_smallest.sort(a)\n swap.sort(a)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":7360,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:02:43","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n while i < len(a):\n if find_position_of_smallest(a, i).swap(a):\n swap(a, i, j).sort(a)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":23995,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:03:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":24082,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 12:03:11","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":12813,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:03:25","func_code":"def rectangle_perimeter(r, n):\n rectangle_perimeter = 2 * (r + n)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4371,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:03:25","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":7528,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:03:25","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40756,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:03:25","func_code":"def rectangle_perimeter(r, n):\n rectangle_perimeter = 2 * (r + n)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":8040,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:03:25","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1967,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:03:25","func_code":"def square_perimeter(n):\n square_perimeter = 4 * n\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40274,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:03:25","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32088,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:03:25","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":7632,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:03:25","func_code":"def square_perimeter(n):\n square_perimeter = 4 * n\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38931,"user":"d6b9871a-67ab-4c5d-894e-eb5d53fae3d1","date":"2017-10-04 12:03:25","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":34894,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 12:03:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":28673,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:03:33","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":27734,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:03:43","func_code":"def rectangle_perimeter(r, n):\n rectancle_perimeter = 2 * (r + n)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42194,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:03:43","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25486,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:03:43","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15885,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:03:43","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31030,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:03:43","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16772,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:03:54","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":18044,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-10-04 12:03:54","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":18646,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 12:04:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":35063,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-10-04 12:04:01","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":7718,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 12:04:34","func_code":"def square_perimeter(n):\n result = n + n + n + n\n return result","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":26579,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 12:04:34","func_code":"def circle_area(n):\n result = 3.14 * (n * n)\n return result","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2834,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 12:04:34","func_code":"def rectangle_perimeter(n, m):\n result = n + n + m + m\n return result","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29501,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 12:04:34","func_code":"def square_area(n):\n result = n * n\n return result","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40803,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 12:04:34","func_code":"def circle_circumference(n):\n result = 2 * 3.14 * n\n return result","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27412,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 12:04:34","func_code":"def square_area(n):\n result = n * n\n return result","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15095,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 12:04:34","func_code":"def rectangle_perimeter(n, m):\n result = n + n + m + m\n return result","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":14919,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 12:04:34","func_code":"def circle_circumference(n):\n result = 2 * 3.14 * n\n return result","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38750,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 12:04:34","func_code":"def circle_area(n):\n result = 3.14 * (n * n)\n return result","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4520,"user":"5c105474-42d8-4a95-a311-034a93c693c8","date":"2017-10-04 12:04:34","func_code":"def square_perimeter(n):\n result = n + n + n + n\n return result","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33863,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:04:37","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20439,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:04:37","func_code":"def circle_circumference(r):\n circle_circumference = 2 * 3.14 * r\n return circle_circumference","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16813,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:04:37","func_code":"def rectangle_perimeter(r, n):\n rectangle_perimeter = 2 * (r + n)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31042,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:04:37","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29135,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:04:37","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31864,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:04:37","func_code":"def rectangle_perimeter(r, n):\n rectangle_perimeter = 2 * (r + n)\n return rectangle_perimeter","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":41227,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:04:37","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16960,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:04:37","func_code":"def square_perimeter(n):\n square_perimeter = n * 4\n return square_perimeter","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33961,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:04:37","func_code":"def circle_area(r):\n circle_area = r * r * 3.14\n return circle_area","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17938,"user":"99d129a4-97af-42ac-a543-23b9157331f8","date":"2017-10-04 12:04:37","func_code":"def square_area(n):\n square_area = n * n\n return square_area","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6108,"user":"065cc64f-1be3-42fb-9f2e-8280c11aa573","date":"2017-10-04 12:06:42","func_code":"def sort(a):\n b = a\n b = 0\n j = 1\n while j < len(a):\n if a[j] < a[b]:\n p = j\n j = j + 1\n return b","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":12063,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-04 12:06:44","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":23348,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-10-04 12:06:44","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":16961,"user":"065cc64f-1be3-42fb-9f2e-8280c11aa573","date":"2017-10-04 12:06:56","func_code":"def sort(a):\n b = 0\n j = 1\n while j < len(a):\n if a[j] < a[b]:\n p = j\n j = j + 1\n return b","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":27201,"user":"065cc64f-1be3-42fb-9f2e-8280c11aa573","date":"2017-10-04 12:06:56","func_code":"def sort(a):\n b = 0\n j = 1\n while j < len(a):\n if a[j] < a[b]:\n p = j\n j = j + 1\n return b","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":37967,"user":"065cc64f-1be3-42fb-9f2e-8280c11aa573","date":"2017-10-04 12:06:56","func_code":"def sort(a):\n b = 0\n j = 1\n while j < len(a):\n if a[j] < a[b]:\n p = j\n j = j + 1\n return b","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":36982,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-04 12:07:30","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":28632,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-04 12:08:28","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":16752,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-04 12:09:07","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":5917,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-04 12:10:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":32764,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-04 12:10:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":29783,"user":"03324848-d1b1-4b00-9ab7-93d76a61a9c0","date":"2017-10-04 12:10:29","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n p = find_position_of_smallest(a, j)\n swap(a, j, p)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":41152,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-10-04 12:10:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":20643,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-10-04 12:10:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":27803,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-10-04 12:10:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":12879,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:10:52","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while i < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":14248,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:11:08","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n j = 0\n while j < len(a):\n find_position_of_smallest(a, i)\n swap(a, i, j)\n j = j + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":28136,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-04 12:11:42","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n l = 0\n while l < len(a):\n p = find_position_of_smallest(a, l)\n swap(a, l, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":5007,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-04 12:12:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n l = 0\n while l < len(a):\n p = find_position_of_smallest(a, l)\n swap(a, l, p)\n l = l + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":35685,"user":"4b4cb32f-e677-40c7-8bdb-79ba1dd2a70b","date":"2017-10-04 12:12:06","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n l = 0\n while l < len(a):\n p = find_position_of_smallest(a, l)\n swap(a, l, p)\n l = l + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":28732,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:14:14","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n l = 0\n while l < len(a):\n p = find_position_of_smallest(a, l)\n swap(a, p, l)\n l = l + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":11508,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:14:41","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n l = 0\n while l < len(a):\n p = find_position_of_smallest(a, l)\n swap(a, p, l)\n l = l + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":24613,"user":"29ee2b4b-4fb7-46c9-986d-b715bcee0fbe","date":"2017-10-04 12:14:41","func_code":"def swap(a, i, j):\n temp = a[i]\n a[i] = a[j]\n a[j] = temp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n l = 0\n while l < len(a):\n p = find_position_of_smallest(a, l)\n swap(a, p, l)\n l = l + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":20766,"user":"e5dedf13-336d-484f-81bc-d7898f0f002e","date":"2017-10-04 12:22:33","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":23242,"user":"e5dedf13-336d-484f-81bc-d7898f0f002e","date":"2017-10-04 12:22:33","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":25282,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-04 18:32:34","func_code":"def circle_circumference(n):\n circle = 2 * 3.14 * n\n return circle","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":39873,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-04 18:32:34","func_code":"def perimeter(n):\n per = n * 4\n return per\n\n\ndef rectangle_perimeter(n, m):\n rec = n * 2 + m * 2\n return rec","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2025,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-04 18:32:34","func_code":"def circle_area(n):\n circ = 3.14 * (n * n)\n return circ","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":25103,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-04 18:32:34","func_code":"def circle_area(n):\n circ = 3.14 * (n * n)\n return circ","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":15937,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-04 18:32:34","func_code":"def circle_circumference(n):\n circle = 2 * 3.14 * n\n return circle","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1427,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-04 18:32:34","func_code":"def perimeter(n):\n per = n * 4\n return per\n\n\ndef rectangle_perimeter(n, m):\n rec = n * 2 + m * 2\n return rec","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20998,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-04 18:33:08","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2808,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-04 18:33:08","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37333,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-04 18:33:08","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":20451,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:47:02","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11193,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:47:02","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40235,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:52:19","func_code":"def perimeter(n):\n per = n + n + n + n\n return per\n\n\ndef rectangle_perimeter(n, m):\n rec = n + m + n + m\n return rec","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42158,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:52:19","func_code":"def circle_area(n):\n circ = 3.14 * (n * n)\n return circ","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":11622,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:52:19","func_code":"def circle_circumference(n):\n circle = 2 * 3.14 * n\n return circle","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":7878,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:55:29","func_code":"def circle_circumference(n):\n result3 = 2 * 3.14 * n\n return result3","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27232,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:55:29","func_code":"def circle_area(n):\n result2 = 3.14 * (n * n)\n return result2","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4418,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:55:29","func_code":"def perimeter(n):\n result1 = n + n + n + n\n return result1\n\n\ndef rectangle_perimeter(n, m):\n result4 = n + m + n + m\n return result4","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27697,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:56:53","func_code":"def square_perimeter(n):\n result1 = n + n + n + n\n return result1","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31504,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:56:53","func_code":"def rectangle_perimeter(n, m):\n result4 = n + m + n + m\n return result4","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32490,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:56:53","func_code":"def circle_circumference(n):\n result3 = 2 * 3.14 * n\n return result3","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":1467,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:56:53","func_code":"def circle_area(n):\n result2 = 3.14 * (n * n)\n return result2","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13422,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:56:53","func_code":"def square_area(n):\n result = n * n\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17102,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def circle_circumference(n):\n result3 = 2 * 3.14 * n\n return result3","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32439,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def circle_area(n):\n result2 = 3.14 * (n * n)\n return result2","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4407,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def rectangle_perimeter(n, m):\n result4 = n + m + n + m\n return result4","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":28474,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def square_perimeter(n):\n result1 = n + n + n + n\n return result1","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18271,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def square_area(n):\n result = n * n\n return result","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":7617,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def rectangle_perimeter(n, m):\n result4 = n + m + n + m\n return result4","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42057,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def square_area(n):\n result = n * n\n return result","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9053,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def circle_area(n):\n result2 = 3.14 * (n * n)\n return result2","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9336,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def circle_area(n):\n result2 = 3.14 * (n * n)\n return result2","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":9633,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def square_perimeter(n):\n result1 = n + n + n + n\n return result1","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27502,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def circle_circumference(n):\n result3 = 2 * 3.14 * n\n return result3","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":4238,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def square_perimeter(n):\n result1 = n + n + n + n\n return result1","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":8710,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def rectangle_perimeter(n, m):\n result4 = n + m + n + m\n return result4","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":27286,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def square_area(n):\n result = n * n\n return result","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6111,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-10-05 15:57:34","func_code":"def circle_circumference(n):\n result3 = 2 * 3.14 * n\n return result3","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5534,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:06:07","func_code":"def sort(a):\n a.sort(a)","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":32567,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:19:09","func_code":"def sort(a):\n i = 0\n while i < len(a):\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":907,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:43:08","func_code":"def sort(a):\n i = 0\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[i]\n a[i] = a[n]\n a[n] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":32863,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:43:26","func_code":"def sort(a):\n i = 0\n n = 0\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[i]\n a[i] = a[n]\n a[n] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":11076,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:43:51","func_code":"def sort(a):\n i = 0\n n = 0\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[i]\n a[i] = a[n]\n a[n] = tmp","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":31360,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:44:14","func_code":"def sort(a):\n i = 0\n n = 0\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[i]\n a[i] = a[n]\n a[n] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":13183,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:46:43","func_code":"def sort(a):\n i = 0\n p = 0\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":19469,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:47:59","func_code":"def sort(a):\n i = 0\n p = 0\n while i < len(a):\n if a[i] > a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":15762,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:48:42","func_code":"def sort(a):\n i = 0\n p = 0\n while i > len(a):\n if a[i] > a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":32223,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:48:53","func_code":"def sort(a):\n i = 0\n p = 0\n while i > len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":13622,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:50:03","func_code":"def sort(a):\n i = 1\n p = 0\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":39581,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:50:19","func_code":"def sort(a):\n i = 0\n p = 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":17265,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:51:44","func_code":"def sort(a):\n n = i\n i = i + 1\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":10346,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:52:20","func_code":"def sort(a):\n n = i\n i = i + 1\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":4581,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:57:19","func_code":"def sort(a):\n n = i\n i = i + 1\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[n]\n a[n] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":22445,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:57:50","func_code":"def sort(a):\n i = i + 1\n n = i\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[n]\n a[n] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":25051,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 16:58:10","func_code":"def sort(a):\n i = 0\n while i < len(a):\n if a[i] < a[n]:\n n = i\n i = i + 1\n tmp = a[n]\n a[n] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":25442,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 17:02:28","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":21284,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 17:02:28","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":21379,"user":"7c4a70b0-f238-44c3-98e9-fba759a5438b","date":"2017-10-06 17:02:28","func_code":"def sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":38831,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 14:54:51","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":26426,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 14:54:51","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry_1.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":7189,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:04:47","func_code":"def circle_circumference(n):\n cc = 2 * 3.14 * n","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6264,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:04:47","func_code":"def rectangle_perimeter(n):\n rp = n + n + m + m","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":30885,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:04:47","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":29647,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:04:47","func_code":"def square_perimeter(n):\n sp = n + n + n + n","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13951,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:04:47","func_code":"def circle_area(n):\n ca = 3.14 * n","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":18871,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:05:47","func_code":"def rectangle_perimeter(n):\n rp = n + n + m + m\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":36063,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:05:47","func_code":"def circle_area(n):\n ca = 3.14 * n\n return ca","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":36807,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:05:47","func_code":"def square_perimeter(n):\n sp = n + n + n + n\n return sp","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":23049,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:05:47","func_code":"def circle_circumference(n):\n cc = 2 * 3.14 * n\n return cc","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":32843,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:05:47","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":38631,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:27","func_code":"def circle_circumference(n):\n cc = 2 * 3.14 * n\n return cc","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22383,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:27","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":13024,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:27","func_code":"def square_perimeter(n):\n sp = n + n + n + n\n return sp","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":30708,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:27","func_code":"def circle_area(n):\n ca = 3.14 * n * n\n return ca","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":2189,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:27","func_code":"def rectangle_perimeter(n):\n rp = n + n + m + m\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42034,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:52","func_code":"def circle_area(n):\n ca = 3.14 * n * n\n return ca","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5922,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:52","func_code":"def circle_area(n):\n ca = 3.14 * n * n\n return ca","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":110,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:52","func_code":"def rectangle_perimeter(n, m):\n rp = n + n + m + m\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":40385,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:52","func_code":"def square_perimeter(n):\n sp = n + n + n + n\n return sp","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42162,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:52","func_code":"def circle_circumference(n):\n cc = 2 * 3.14 * n\n return cc","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":37056,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:52","func_code":"def square_perimeter(n):\n sp = n + n + n + n\n return sp","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":42251,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:52","func_code":"def rectangle_perimeter(n, m):\n rp = n + n + m + m\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":6507,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:52","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":22023,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:52","func_code":"def square_area(n):\n sq = n * n\n return sq","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":12042,"user":"61140bd5-cdb2-4a78-b4a3-ad76b0ca223a","date":"2017-10-09 15:06:52","func_code":"def circle_circumference(n):\n cc = 2 * 3.14 * n\n return cc","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31209,"user":"557b99ed-3c48-4070-b887-de4b2d06ac8d","date":"2017-10-11 12:00:21","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n swap(a, i, find_position_of_smallest + i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":8946,"user":"557b99ed-3c48-4070-b887-de4b2d06ac8d","date":"2017-10-11 12:01:28","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":15847,"user":"557b99ed-3c48-4070-b887-de4b2d06ac8d","date":"2017-10-11 12:01:28","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n while i < len(a):\n if a[i] < a[p]:\n p = i\n i = i + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":40953,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-11-06 13:28:34","func_code":"def square_area(a):\n sa = a * a\n return sa","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":10974,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-11-06 13:28:34","func_code":"def square_perimeter(b):\n sp = b + b + b + b\n return sp","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":16429,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-11-06 13:28:34","func_code":"def circle_circumference(d):\n cc = 2 * 3.14 * d\n return cc","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":33513,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-11-06 13:28:34","func_code":"def rectangle_perimeter(e, f):\n rp = 2 * (e + f)\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":5465,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-11-06 13:28:34","func_code":"def circle_area(c):\n ca = 3.14 * c ** 2\n return ca","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":17854,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-11-06 13:28:34","func_code":"def square_perimeter(b):\n sp = b + b + b + b\n return sp","func_name":"square_perimeter","assignment_id":"geometry.py_ca277_square_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":35411,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-11-06 13:28:34","func_code":"def circle_circumference(d):\n cc = 2 * 3.14 * d\n return cc","func_name":"circle_circumference","assignment_id":"geometry.py_ca277_circle_circumference","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":21343,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-11-06 13:28:34","func_code":"def rectangle_perimeter(e, f):\n rp = 2 * (e + f)\n return rp","func_name":"rectangle_perimeter","assignment_id":"geometry.py_ca277_rectangle_perimeter","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":21263,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-11-06 13:28:34","func_code":"def circle_area(c):\n ca = 3.14 * c ** 2\n return ca","func_name":"circle_area","assignment_id":"geometry.py_ca277_circle_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":31822,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-11-06 13:28:34","func_code":"def square_area(a):\n sa = a * a\n return sa","func_name":"square_area","assignment_id":"geometry.py_ca277_square_area","academic_year":2016,"module":"ca277","description":null,"test":"","correct":true} +{"submission_id":36040,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-11-08 06:24:49","func_code":"def reverse(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[len(a) - i - 1])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":27850,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-11-08 06:24:49","func_code":"def reverse(a):\n b = []\n i = 0\n while i < len(a):\n b.append(a[len(a) - i - 1])\n i = i + 1\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":14905,"user":"2a5e3eed-41c7-46e6-9bee-3acc21c1f81b","date":"2017-11-08 09:55:26","func_code":"def reverse(a, i):\n i = 0\n lines = sys.stdin.readlines()\n while i < len(a):\n print(lines[i] - 1 - i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":15224,"user":"2a5e3eed-41c7-46e6-9bee-3acc21c1f81b","date":"2017-11-08 09:55:26","func_code":"def reverse(a, i):\n i = 0\n lines = sys.stdin.readlines()\n while i < len(a):\n print(lines[i] - 1 - i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":22801,"user":"2a5e3eed-41c7-46e6-9bee-3acc21c1f81b","date":"2017-11-08 09:55:26","func_code":"def reverse(a, i):\n i = 0\n lines = sys.stdin.readlines()\n while i < len(a):\n print(lines[i] - 1 - i)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":5638,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 10:51:43","func_code":"def reverse(n):\n reverse = a[len(a) - i - 1]\n return reverse","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":40328,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 10:52:22","func_code":"def reverse(n):\n reverse = a[len(a) - i - 1]\n return reverse","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":17712,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 10:52:45","func_code":"def reverse(n):\n reverse = a[len(a) - i - 1]\n return reverse","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":1406,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-11-08 11:09:41","func_code":"def reverse(l):\n return l[::-1]","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":37176,"user":"03141ef3-f364-4b7c-9f52-990a173ac162","date":"2017-11-08 11:09:41","func_code":"def reverse(l):\n return l[::-1]","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":31148,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-11-08 11:34:18","func_code":"def reverse(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[i] = tmp","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":308,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-11-08 11:38:54","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":41018,"user":"f1f904a5-bcf8-461e-8792-f0a8d0db3f47","date":"2017-11-08 11:38:54","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":8026,"user":"2d5a247c-29b2-4cc2-a956-669a2206edc8","date":"2017-11-08 11:39:55","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":37066,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 11:44:18","func_code":"def reverse(a):\n a = a[::a - 1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":18221,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 11:44:39","func_code":"def reverse(a):\n a[::a - 1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":13955,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 11:46:08","func_code":"def reverse(a):\n a = a[::a - 1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":27993,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 11:47:21","func_code":"def reverse(i, j, k):\n a = a[::-1]\n print(a)","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":2731,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 11:47:38","func_code":"def reverse(a):\n a = a[::-1]\n print(a)","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":28616,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 11:48:06","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":15708,"user":"4205f21d-1c6e-499a-a25c-83a2d9d5ad93","date":"2017-11-08 11:48:18","func_code":"def reverse(string):\n results = string[::-1]\n return string[::-1]","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":26924,"user":"4205f21d-1c6e-499a-a25c-83a2d9d5ad93","date":"2017-11-08 11:48:18","func_code":"def reverse(string):\n results = string[::-1]\n return string[::-1]","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":4512,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 11:48:33","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":576,"user":"6cfd63a4-4ae6-4e36-a1eb-a1b3142265bb","date":"2017-11-08 11:48:33","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":21193,"user":"ea7c3666-b2a8-45fc-9644-69fa2415de49","date":"2017-11-08 11:53:51","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":25555,"user":"ea7c3666-b2a8-45fc-9644-69fa2415de49","date":"2017-11-08 11:53:51","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":26290,"user":"ea7c3666-b2a8-45fc-9644-69fa2415de49","date":"2017-11-08 11:53:51","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":12670,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-11-08 12:00:34","func_code":"def reverse(a):\n i = 0\n a = a[a:-i - 1]\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":34708,"user":"2d5a247c-29b2-4cc2-a956-669a2206edc8","date":"2017-11-08 12:01:02","func_code":"def reverse(a):\n while i < len(a):\n return len(a) - 1","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":18225,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:03:04","func_code":"def reverse(a):\n i = 0\n j = len(a)\n while i < len(a):\n tmp = a[i]\n a[i] = a[j - i]\n a[j - i] = tmp\n print(a)","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":6354,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 12:03:23","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = a[i]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":36980,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-11-08 12:04:01","func_code":"def reverse(a_string):\n new_string = ''\n index = len(a_string)\n while index:\n index -= 1\n new_string += a_string[index]\n return new_string","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":6583,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 12:04:12","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i]\n a[len(a) - i] = a[i]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":23454,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:04:58","func_code":"def reverse(a):\n i = 0\n j = len(a)\n while i < len(a):\n tmp = a[i]\n a[i] = a[j - i]\n a[j - i] = tmp\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":33738,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-11-08 12:05:06","func_code":"def reverse(test):\n n = len(test)\n x = ''\n for i in range(n - 1, -1, -1):\n x += test[i]\n return x","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":13862,"user":"c45598e5-3acc-4052-b18a-228b6bd842f6","date":"2017-11-08 12:05:06","func_code":"def reverse(test):\n n = len(test)\n x = ''\n for i in range(n - 1, -1, -1):\n x += test[i]\n return x","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":29785,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:05:40","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i]\n a[len(a) - i] = tmp\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":314,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 12:05:41","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = a[i]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":19741,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 12:06:51","func_code":"def reverse(a):\n a = []\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = a[i]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":31938,"user":"639d0a36-d89c-469e-a1ae-4cadc99d8827","date":"2017-11-08 12:06:51","func_code":"def reverse(a):\n a = []\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = a[i]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":2391,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:08:51","func_code":"def reverse(a):\n a = []\n i = 0\n rev = a[len(a) - i - 1]\n return rev","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":34704,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:09:25","func_code":"def reverse(a):\n rev = a[len(a) - i - 1]\n return rev","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":34251,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:09:46","func_code":"def reverse(a):\n i = 0\n rev = a[len(a) - i - 1]\n return rev","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":30446,"user":"2d5a247c-29b2-4cc2-a956-669a2206edc8","date":"2017-11-08 12:10:38","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":12651,"user":"2d5a247c-29b2-4cc2-a956-669a2206edc8","date":"2017-11-08 12:10:38","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":4809,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:14:45","func_code":"def reverse(a):\n print(reverse(a[i]))","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":16905,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:14:59","func_code":"def reverse(a):\n print(reverse(a))","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":17088,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:14:59","func_code":"def reverse(a):\n print(reverse(a))","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":25370,"user":"ce889881-69dd-4396-aceb-e6f7dddc2c14","date":"2017-11-08 12:14:59","func_code":"def reverse(a):\n print(reverse(a))","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":41682,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-11-08 12:26:29","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":15213,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:31:30","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i]\n a[len(a) - i] = tmp\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":13346,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:32:04","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":21871,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:32:43","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n print(a.rstrip())","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":31897,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:39:38","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n print(a.rstrip())\n print(tmp)\n print(a[i])","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":23066,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:40:36","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n print(a.rstrip())","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":30000,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:41:05","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":13915,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:42:21","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":5441,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:43:09","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":9937,"user":"e84d5440-bfc2-41cd-a020-f2cd55cb79b4","date":"2017-11-08 12:43:09","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[len(a) - i - 1]\n a[len(a) - i - 1] = tmp\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":32121,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-11-08 12:45:35","func_code":"def reverse(a, i, j):\n a = []\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":18033,"user":"0ea9000e-74e5-4eea-8653-1bfeeae4aab1","date":"2017-11-08 12:46:22","func_code":"def reverse(a, i, j):\n a = []\n i = 0\n j = 0\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":10921,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-09 12:06:17","func_code":"def reverse(n):\n i = 0\n while i < len(a):\n print(n[len(n) - (i + 1)])\n i = i + 1","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":32892,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-09 12:08:08","func_code":"def reverse(n):\n i = 0\n while i < len(n):\n print(n[len(n) - (i + 1)])\n i = i + 1","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":36302,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-09 12:18:55","func_code":"def reverse(n):\n a = []\n i = 0\n while i < len(n):\n a.append(n)\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":22970,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-09 12:19:35","func_code":"def reverse(n):\n i = 0\n while i < len(n):\n print(n)\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":29476,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-09 12:19:56","func_code":"def reverse(n):\n a = []\n i = 0\n while i < len(n):\n print(n)\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":12141,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-09 12:36:04","func_code":"def reverse(n):\n a = []\n i = 0\n j = len(n) - 1\n while i < len(n) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n print(a)","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":7086,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-11-14 11:02:47","func_code":"def reverse(a):\n b = a[::-1]\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":32746,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-11-14 11:02:47","func_code":"def reverse(a):\n b = a[::-1]\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":41365,"user":"058b18f6-cf34-4afc-8b4e-0f7705be27f0","date":"2017-11-14 11:02:47","func_code":"def reverse(a):\n b = a[::-1]\n return b","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":29350,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-14 15:33:26","func_code":"def reverse(n):\n i = 0\n while i < len(n) \/ 2:\n print(n[len(n) - i - 1])\n i = i + 1","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":15609,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-14 15:38:48","func_code":"def reverse(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":26150,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-14 15:39:15","func_code":"def reverse(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a.rstrip()","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":16554,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-14 15:39:43","func_code":"def reverse(a, i, j):\n a = []\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":16231,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-14 15:39:43","func_code":"def reverse(a, i, j):\n a = []\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":29636,"user":"dcc2a3d3-d90d-4640-9797-7d037bff9027","date":"2017-11-14 15:39:43","func_code":"def reverse(a, i, j):\n a = []\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":10085,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-11-14 15:47:16","func_code":"def reverse(a):\n temp = []\n i = 0\n while i != len(a):\n temp.append(len(a) - 1)\n i = i + 1\n a = temp\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":11384,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-11-14 15:47:36","func_code":"def reverse(a):\n temp = []\n i = 0\n while i != len(a):\n temp.append(len(a) - i)\n i = i + 1\n a = temp\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":34899,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-11-14 15:48:07","func_code":"def reverse(a):\n temp = []\n i = 0\n while i != len(a):\n temp.append(a[len(a) - i])\n i = i + 1\n a = temp\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":false} +{"submission_id":24963,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-11-14 15:48:27","func_code":"def reverse(a):\n temp = []\n i = 0\n while i != len(a):\n temp.append(a[len(a) - i - 1])\n i = i + 1\n a = temp\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":38042,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-11-14 16:00:34","func_code":"def reverse(a):\n temp = []\n i = 0\n while i != len(a):\n temp.append(a[len(a) - i - 1])\n i = i + 1\n a = temp\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":3539,"user":"c601c339-f2b7-4564-a96b-2de852eabb7b","date":"2017-11-14 16:00:34","func_code":"def reverse(a):\n temp = []\n i = 0\n while i != len(a):\n temp.append(a[len(a) - i - 1])\n i = i + 1\n a = temp\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":24110,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 11:38:38","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":27398,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 11:38:38","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":36548,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 11:43:10","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":12084,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 11:43:10","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":3724,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 11:44:18","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":31994,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 11:44:18","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":265,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 11:44:18","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19989,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 11:44:18","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":9061,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 12:50:29","func_code":"def selection_sort(a):\n i = 0","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":40858,"user":"4a7eb3c1-23d7-4547-a3af-8d940245a9a3","date":"2017-12-02 13:11:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":3530,"user":"4a7eb3c1-23d7-4547-a3af-8d940245a9a3","date":"2017-12-02 13:11:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":12805,"user":"4a7eb3c1-23d7-4547-a3af-8d940245a9a3","date":"2017-12-02 13:11:08","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":31647,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 13:38:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":34340,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 13:38:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":18622,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 13:43:03","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":27868,"user":"919f743b-c8d6-4955-bb0f-9ca7c9bbe1be","date":"2017-12-02 13:43:03","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":41334,"user":"9083bfed-4cf9-4111-9300-37bfea094de1","date":"2017-12-02 22:43:45","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":33641,"user":"9083bfed-4cf9-4111-9300-37bfea094de1","date":"2017-12-02 22:43:45","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":35075,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:10:01","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":14341,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:10:01","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":36702,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:12:40","func_code":"def circumference(r):\n return r * pi * 2","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":28047,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:12:40","func_code":"def area(r):\n return (r * pi) ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":28671,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:13:37","func_code":"def area(r):\n return r ** 2 * pi","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":12899,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:13:37","func_code":"def circumference(r):\n return r * pi * 2","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":11406,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:13:37","func_code":"def circumference(r):\n return r * pi * 2","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":32634,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:13:37","func_code":"def area(r):\n return r ** 2 * pi","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":40561,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:17:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = a[i]\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":39271,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:18:09","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = a[i]\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":28032,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:18:44","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":200,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:18:44","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":36635,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:25:28","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if j < p:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":41931,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:26:24","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":4830,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-03 15:26:24","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = position_of_smallest(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":20845,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-12-03 19:08:31","func_code":"def union(a, b):\n a = a + b\n seen = {}\n c = []\n i = 0\n while i < len(a):\n if a[i] not in seen:\n seen[a[i]] = True\n i = i + 1\n for number in seen:\n c.append(number)\n return c","func_name":"union","assignment_id":"union","academic_year":2016,"module":"ca277","description":"Merge two lists into a single one.","test":"assert union([],[])==[] and union([25785],[25785])==[25785] and union([-90, 21135, 29310, -8059, 7114, -90, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996],[5, -9316, 7379237229304681733])==[-90, 21135, 29310, -8059, 7114, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996, 5, -9316, 7379237229304681733]","correct":true} +{"submission_id":34065,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-12-03 19:08:31","func_code":"def union(a, b):\n a = a + b\n seen = {}\n c = []\n i = 0\n while i < len(a):\n if a[i] not in seen:\n seen[a[i]] = True\n i = i + 1\n for number in seen:\n c.append(number)\n return c","func_name":"union","assignment_id":"union","academic_year":2016,"module":"ca277","description":"Merge two lists into a single one.","test":"assert union([],[])==[] and union([25785],[25785])==[25785] and union([-90, 21135, 29310, -8059, 7114, -90, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996],[5, -9316, 7379237229304681733])==[-90, 21135, 29310, -8059, 7114, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996, 5, -9316, 7379237229304681733]","correct":true} +{"submission_id":19545,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-12-03 19:08:31","func_code":"def intersection(a, b):\n seen = {}\n append = {}\n c = []\n i = 0\n while i < len(a):\n seen[a[i]] = True\n i = i + 1\n i = 0\n while i < len(b):\n if b[i] in seen and b[i] not in append:\n c.append(b[i])\n append[b[i]] = True\n i = i + 1\n return c","func_name":"intersection","assignment_id":"intersection","academic_year":2016,"module":"ca277","description":"Return the intersection between two lists.","test":"assert intersection([],[])==[] and intersection([20052, 20052, -9991],[102, 20052, -9991])==[20052, -9991] and intersection([38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794],[38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794])==[38908273694008580353068229963801163341, 59, -38, 28239, -2723, 24559, -5794]","correct":true} +{"submission_id":16824,"user":"dbbf7e1a-95ff-4b8a-b26d-18d6ccae623c","date":"2017-12-03 19:08:31","func_code":"def intersection(a, b):\n seen = {}\n append = {}\n c = []\n i = 0\n while i < len(a):\n seen[a[i]] = True\n i = i + 1\n i = 0\n while i < len(b):\n if b[i] in seen and b[i] not in append:\n c.append(b[i])\n append[b[i]] = True\n i = i + 1\n return c","func_name":"intersection","assignment_id":"intersection","academic_year":2016,"module":"ca277","description":"Return the intersection between two lists.","test":"assert intersection([],[])==[] and intersection([20052, 20052, -9991],[102, 20052, -9991])==[20052, -9991] and intersection([38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794],[38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794])==[38908273694008580353068229963801163341, 59, -38, 28239, -2723, 24559, -5794]","correct":true} +{"submission_id":26293,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:13:10","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":21164,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:13:10","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41120,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:18:06","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":2781,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:18:06","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25053,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:18:06","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":1190,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:18:06","func_code":"def area(r):\n return pi * r * r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":2358,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:28:48","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n a[i] = a[-i - 1]\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":1988,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:29:23","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n a[i] = a[len(a) - i - 1]\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":31189,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:32:20","func_code":"def reverse(a):\n i = 0\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[-i - 1]\n a[-i - 1] = tmp\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":13511,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:35:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(i, -i - 1)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":6993,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:35:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, -i - 1)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":31733,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:35:31","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, -i - 1)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":17914,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:41:04","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j += 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":6720,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:44:23","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":21588,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:45:55","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":13468,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:45:55","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":27665,"user":"3a3b6ee9-ae37-4d43-b10a-27ade2385dcd","date":"2017-12-04 10:45:55","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":2873,"user":"334b0f61-5fa3-43cf-8691-29f975dd7270","date":"2017-12-04 12:46:48","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n b.append(a[len(a) - 1 - i])\n i = i + 1\n a = b\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":21895,"user":"334b0f61-5fa3-43cf-8691-29f975dd7270","date":"2017-12-04 12:46:48","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n b.append(a[len(a) - 1 - i])\n i = i + 1\n a = b\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":7272,"user":"334b0f61-5fa3-43cf-8691-29f975dd7270","date":"2017-12-04 12:46:48","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n b.append(a[len(a) - 1 - i])\n i = i + 1\n a = b\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":30760,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-12-04 17:19:04","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":30323,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-12-04 17:19:04","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_iter","academic_year":2016,"module":"ca277","description":"Iteratively reverse a list of elements.","test":"assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto']","correct":true} +{"submission_id":29776,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-12-04 17:19:04","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":34171,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-12-04 17:28:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":5782,"user":"b8415cb6-c612-4985-9211-908831b3834e","date":"2017-12-04 17:28:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef find_position_of_smallest(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n p = find_position_of_smallest(a, i)\n swap(a, p, i)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":true} +{"submission_id":1099,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-12-04 19:48:42","func_code":"def find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":2852,"user":"6618fe7e-6fd3-499b-a742-8d68ec712ad3","date":"2017-12-04 19:48:42","func_code":"def find_position_of_smallest(a, i):\n j = i\n while i < len(a):\n if a[i] < a[j]:\n j = i\n i = i + 1\n return j\n\n\ndef sort(a):\n i = 0\n while i < len(a):\n k = find_position_of_smallest(a, i)\n swap(a, i, k)\n i = i + 1","func_name":"sort","assignment_id":"sort","academic_year":2016,"module":"ca277","description":"Sort a list by repeatedly moving the minimimum of the remaining sublist to the front.","test":"assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None","correct":false} +{"submission_id":18108,"user":"0d8d49aa-e213-4ab4-bcc1-440a0397585c","date":"2017-12-04 22:23:55","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":34408,"user":"0d8d49aa-e213-4ab4-bcc1-440a0397585c","date":"2017-12-04 22:23:55","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":35039,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-12-05 11:31:50","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":11405,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-12-05 11:31:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":2841,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-12-05 11:32:00","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":10005,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-12-05 11:44:53","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":19465,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-12-05 11:45:22","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22764,"user":"df8dd1dd-a7c8-46c0-b89f-ec170a81f08a","date":"2017-12-05 11:45:22","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":29736,"user":"6bdfefac-1fa3-44c6-b066-9e1536e0210e","date":"2017-12-05 12:52:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":36725,"user":"7d992268-b79a-4106-8fbb-4f53742d117d","date":"2017-12-05 12:55:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":23239,"user":"7d992268-b79a-4106-8fbb-4f53742d117d","date":"2017-12-05 12:56:09","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":21374,"user":"7d992268-b79a-4106-8fbb-4f53742d117d","date":"2017-12-05 12:56:19","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":16900,"user":"7d992268-b79a-4106-8fbb-4f53742d117d","date":"2017-12-05 12:57:45","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":42357,"user":"7d992268-b79a-4106-8fbb-4f53742d117d","date":"2017-12-05 12:57:45","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":4064,"user":"a8d7ba55-2066-48ff-a791-991413f703dc","date":"2017-12-05 13:07:37","func_code":"def bsearch(a, q):\n lo = 0\n hi = len(a)\n while lo < hi:\n mid = (lo + hi) \/ 2\n if a[mid] < q:\n lo = mid + 1\n else:\n hi = mid\n return lo","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":6481,"user":"a8d7ba55-2066-48ff-a791-991413f703dc","date":"2017-12-05 13:07:37","func_code":"def bsearch(a, q):\n lo = 0\n hi = len(a)\n while lo < hi:\n mid = (lo + hi) \/ 2\n if a[mid] < q:\n lo = mid + 1\n else:\n hi = mid\n return lo","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1141,"user":"bda058db-eb82-407a-b3b2-8f24355f1fa5","date":"2017-12-05 13:11:36","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n print(low)","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":15850,"user":"8d21baf9-a7ac-4132-92e0-a1002f0c04a9","date":"2017-12-05 13:12:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":7626,"user":"8d21baf9-a7ac-4132-92e0-a1002f0c04a9","date":"2017-12-05 13:12:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":25273,"user":"bda058db-eb82-407a-b3b2-8f24355f1fa5","date":"2017-12-05 13:14:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":12032,"user":"bda058db-eb82-407a-b3b2-8f24355f1fa5","date":"2017-12-05 13:14:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40618,"user":"9f673df6-fcfd-4d07-b0dd-1f553c38f25b","date":"2017-12-05 13:17:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":38519,"user":"9f673df6-fcfd-4d07-b0dd-1f553c38f25b","date":"2017-12-05 13:17:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3355,"user":"dcc424e7-96ab-4451-ad16-597d84c13c2e","date":"2017-12-05 13:18:06","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":16050,"user":"dcc424e7-96ab-4451-ad16-597d84c13c2e","date":"2017-12-05 13:20:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26626,"user":"dcc424e7-96ab-4451-ad16-597d84c13c2e","date":"2017-12-05 13:21:45","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3120,"user":"dcc424e7-96ab-4451-ad16-597d84c13c2e","date":"2017-12-05 13:22:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return mid","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":41772,"user":"dcc424e7-96ab-4451-ad16-597d84c13c2e","date":"2017-12-05 13:23:14","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":11204,"user":"dcc424e7-96ab-4451-ad16-597d84c13c2e","date":"2017-12-05 13:23:14","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":4681,"user":"7c3b55b1-74b7-4570-8484-5a4354d497aa","date":"2017-12-05 13:44:29","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":35087,"user":"7c3b55b1-74b7-4570-8484-5a4354d497aa","date":"2017-12-05 13:44:29","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9413,"user":"104b03f1-1241-495d-996a-ba8f4a26b8bc","date":"2017-12-05 13:52:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + high \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":37078,"user":"6bdfefac-1fa3-44c6-b066-9e1536e0210e","date":"2017-12-05 13:54:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":17943,"user":"104b03f1-1241-495d-996a-ba8f4a26b8bc","date":"2017-12-05 13:55:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + high \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":25012,"user":"104b03f1-1241-495d-996a-ba8f4a26b8bc","date":"2017-12-05 13:56:03","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":41857,"user":"104b03f1-1241-495d-996a-ba8f4a26b8bc","date":"2017-12-05 13:56:03","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":38654,"user":"f4380e0a-3bfd-44c6-b455-fe1018a45321","date":"2017-12-05 13:57:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if q > a[mid]:\n assert a[low - 1] < q\n low = mid + 1\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9179,"user":"6bdfefac-1fa3-44c6-b066-9e1536e0210e","date":"2017-12-05 13:58:32","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":24873,"user":"6bdfefac-1fa3-44c6-b066-9e1536e0210e","date":"2017-12-05 13:58:32","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":23371,"user":"a998fa29-b3b1-437f-9555-da670b1ae43b","date":"2017-12-05 13:59:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":28008,"user":"a998fa29-b3b1-437f-9555-da670b1ae43b","date":"2017-12-05 13:59:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18062,"user":"f4380e0a-3bfd-44c6-b455-fe1018a45321","date":"2017-12-05 13:59:51","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if q > a[mid]:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":34200,"user":"f4380e0a-3bfd-44c6-b455-fe1018a45321","date":"2017-12-05 14:05:03","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if q > a[mid]:\n assert a[low - 1] < q\n low = mid + 1\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":25482,"user":"156114dd-8a1c-4e95-a7b3-fb54488e2dcf","date":"2017-12-05 14:05:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":38838,"user":"156114dd-8a1c-4e95-a7b3-fb54488e2dcf","date":"2017-12-05 14:05:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":24344,"user":"539a3d07-c706-42ed-bbbe-db66980d170f","date":"2017-12-05 14:05:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18810,"user":"539a3d07-c706-42ed-bbbe-db66980d170f","date":"2017-12-05 14:05:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":5026,"user":"7eb02a08-e561-4e33-a415-6df6cc4ff4a9","date":"2017-12-05 14:05:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8812,"user":"7eb02a08-e561-4e33-a415-6df6cc4ff4a9","date":"2017-12-05 14:05:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":512,"user":"9dea5530-0f82-4127-b25f-20c784224a03","date":"2017-12-05 14:06:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26955,"user":"9dea5530-0f82-4127-b25f-20c784224a03","date":"2017-12-05 14:06:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":12236,"user":"f4380e0a-3bfd-44c6-b455-fe1018a45321","date":"2017-12-05 14:06:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if q > a[mid]:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":19057,"user":"f4380e0a-3bfd-44c6-b455-fe1018a45321","date":"2017-12-05 14:06:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if q > a[mid]:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":27557,"user":"85db1d22-a87d-4132-bd9a-e07bf9282015","date":"2017-12-05 14:06:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":38976,"user":"85db1d22-a87d-4132-bd9a-e07bf9282015","date":"2017-12-05 14:06:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":25192,"user":"75fca52d-a61c-4d91-946c-d376c5569767","date":"2017-12-05 14:06:50","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":10998,"user":"75fca52d-a61c-4d91-946c-d376c5569767","date":"2017-12-05 14:06:50","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":7580,"user":"0412928d-97c6-46f2-980b-7d98214b9765","date":"2017-12-05 14:07:17","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22311,"user":"bb523aa9-260c-45a0-8676-45ed3ab261ee","date":"2017-12-05 14:08:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n print(low)","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13072,"user":"0412928d-97c6-46f2-980b-7d98214b9765","date":"2017-12-05 14:08:23","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":36596,"user":"0412928d-97c6-46f2-980b-7d98214b9765","date":"2017-12-05 14:08:23","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":31274,"user":"1e76a94c-89e1-4ef2-b3bb-9e98e7be1a2c","date":"2017-12-05 14:09:06","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26187,"user":"b799d072-e18e-40e6-96cb-77c78c9e2a0f","date":"2017-12-05 14:09:07","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < p:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13349,"user":"1e76a94c-89e1-4ef2-b3bb-9e98e7be1a2c","date":"2017-12-05 14:09:34","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":7465,"user":"b799d072-e18e-40e6-96cb-77c78c9e2a0f","date":"2017-12-05 14:09:35","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":41495,"user":"bb62ca90-d7ec-42bb-b255-0f55492691ea","date":"2017-12-05 14:09:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9008,"user":"bb62ca90-d7ec-42bb-b255-0f55492691ea","date":"2017-12-05 14:09:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":996,"user":"60b76a41-ddf8-4d27-a286-8da8c4e298cd","date":"2017-12-05 14:09:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":6355,"user":"60b76a41-ddf8-4d27-a286-8da8c4e298cd","date":"2017-12-05 14:09:55","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":7016,"user":"142cacda-ba1b-469c-9b25-8603a78324c9","date":"2017-12-05 14:10:03","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":20369,"user":"1e76a94c-89e1-4ef2-b3bb-9e98e7be1a2c","date":"2017-12-05 14:10:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22267,"user":"d86203fa-9e1b-4fc0-a3a6-b40a78065d80","date":"2017-12-05 14:10:22","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1459,"user":"d86203fa-9e1b-4fc0-a3a6-b40a78065d80","date":"2017-12-05 14:10:22","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8492,"user":"1e76a94c-89e1-4ef2-b3bb-9e98e7be1a2c","date":"2017-12-05 14:10:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":276,"user":"1e76a94c-89e1-4ef2-b3bb-9e98e7be1a2c","date":"2017-12-05 14:10:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":38204,"user":"3f0a2ff2-f068-43e9-9a21-42850d31b8d3","date":"2017-12-05 14:11:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":7457,"user":"3f0a2ff2-f068-43e9-9a21-42850d31b8d3","date":"2017-12-05 14:11:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":27906,"user":"bb523aa9-260c-45a0-8676-45ed3ab261ee","date":"2017-12-05 14:12:13","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] <= q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":2827,"user":"16011fd4-f5e2-4c2c-b014-86692ff746d5","date":"2017-12-05 14:12:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":2261,"user":"142cacda-ba1b-469c-9b25-8603a78324c9","date":"2017-12-05 14:13:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":784,"user":"27057d38-c1f9-4b8d-a26e-f287a0546d33","date":"2017-12-05 14:13:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":7867,"user":"9d69cd84-adaa-42a8-9530-416762b34c13","date":"2017-12-05 14:13:12","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":17737,"user":"9d69cd84-adaa-42a8-9530-416762b34c13","date":"2017-12-05 14:13:12","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":19912,"user":"f734d662-6b82-46af-93a9-92b490e12476","date":"2017-12-05 14:13:16","func_code":"def bsearch(a, q):\n low = 0\n high = 0\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":19882,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:13:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n mid = 0\n i = 0\n if q in a:\n while a[i] != q:\n i += 1\n print(i)\n else:\n while low != high:\n mid = (high + low) \/ 2\n if q[mid] < low:\n high = mid\n else:\n low = mid\n print(low)","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":14375,"user":"4a7eb3c1-23d7-4547-a3af-8d940245a9a3","date":"2017-12-05 14:13:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":23680,"user":"4a7eb3c1-23d7-4547-a3af-8d940245a9a3","date":"2017-12-05 14:13:59","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":20052,"user":"f734d662-6b82-46af-93a9-92b490e12476","date":"2017-12-05 14:14:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":14979,"user":"f734d662-6b82-46af-93a9-92b490e12476","date":"2017-12-05 14:14:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":25179,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-05 14:14:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n assert a[low - i] < q\n low = mid + 1\n else:\n assert q <= a[high]\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8531,"user":"7d63d843-7e5d-4c24-a378-1056c311dfd2","date":"2017-12-05 14:15:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":27594,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-05 14:15:12","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n assert a[low - i] < q\n low = mid + 1\n else:\n assert q <= a[high]\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":610,"user":"1ea53a09-863b-4396-bbe3-e75221238368","date":"2017-12-05 14:15:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":42049,"user":"142cacda-ba1b-469c-9b25-8603a78324c9","date":"2017-12-05 14:15:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":33125,"user":"142cacda-ba1b-469c-9b25-8603a78324c9","date":"2017-12-05 14:15:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40034,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-05 14:15:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13244,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-05 14:15:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":32382,"user":"1ea53a09-863b-4396-bbe3-e75221238368","date":"2017-12-05 14:15:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13588,"user":"1ea53a09-863b-4396-bbe3-e75221238368","date":"2017-12-05 14:15:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":4673,"user":"b799d072-e18e-40e6-96cb-77c78c9e2a0f","date":"2017-12-05 14:15:56","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":12256,"user":"bb523aa9-260c-45a0-8676-45ed3ab261ee","date":"2017-12-05 14:16:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n print(low)","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9169,"user":"bb523aa9-260c-45a0-8676-45ed3ab261ee","date":"2017-12-05 14:16:47","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":32233,"user":"bb523aa9-260c-45a0-8676-45ed3ab261ee","date":"2017-12-05 14:16:47","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":36874,"user":"20997107-3eee-4a62-bc0c-56e29ffe0c3d","date":"2017-12-05 14:17:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n assert a[mid + 1 - 1] < q\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":23559,"user":"20997107-3eee-4a62-bc0c-56e29ffe0c3d","date":"2017-12-05 14:17:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n assert a[mid + 1 - 1] < q\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":35657,"user":"57b690d2-56f4-4fcf-abf7-8719f8802aae","date":"2017-12-05 14:17:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= [high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":30380,"user":"57b690d2-56f4-4fcf-abf7-8719f8802aae","date":"2017-12-05 14:17:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= [high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":10888,"user":"00ee78cc-7a00-47a7-85bb-9c524dad656c","date":"2017-12-05 14:18:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":33568,"user":"e4629340-a577-4a87-bbfb-8adf98c283ef","date":"2017-12-05 14:18:33","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high - low) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":14977,"user":"d0e5b214-932e-4ec6-ae62-66baacab8b6c","date":"2017-12-05 14:19:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":28124,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:19:06","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] <= q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":17085,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:19:15","func_code":"def bsearch(arr, tgt):\n lo = 0\n hi = len(arr)\n while lo != hi:\n mid = (lo + hi) \/ 2\n if arr[mid] < tgt:\n lo = mid + 1\n else:\n hi = mid - 1\n return (lo + hi) \/\/ 2 + 1 if arr[-1] == tgt else (lo + hi) \/\/ 2","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1996,"user":"e4629340-a577-4a87-bbfb-8adf98c283ef","date":"2017-12-05 14:19:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":11410,"user":"e4629340-a577-4a87-bbfb-8adf98c283ef","date":"2017-12-05 14:19:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":710,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:19:58","func_code":"def bsearch(arr, tgt):\n lo = 0\n hi = len(arr)\n while lo <= hi:\n mid = (lo + hi) \/ 2\n if arr[mid] < tgt:\n lo = mid + 1\n else:\n hi = mid - 1\n return (lo + hi) \/ 2","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":33818,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:20:15","func_code":"def bsearch(arr, tgt):\n lo = 0\n hi = len(arr)\n while lo != hi:\n mid = (lo + hi) \/ 2\n if arr[mid] < tgt:\n lo = mid + 1\n else:\n hi = mid - 1\n return (lo + hi) \/ 2","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3050,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:20:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n while True:\n if high < low:\n return -1\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n elif a[mid] > q:\n high = mid - 1\n else:\n return mid","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":32397,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:20:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] <= q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":27535,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:21:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] <= q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":21101,"user":"5aa80855-56ed-43aa-9b33-19faef108ec0","date":"2017-12-05 14:21:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":31513,"user":"5aa80855-56ed-43aa-9b33-19faef108ec0","date":"2017-12-05 14:21:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":23322,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:21:23","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while True:\n if high < low:\n return -1\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n elif a[mid] > q:\n high = mid - 1\n else:\n return mid","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9635,"user":"e425d75d-4acb-48c4-b113-9d72b4603c15","date":"2017-12-05 14:21:26","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if q > a[mid]:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":17661,"user":"e425d75d-4acb-48c4-b113-9d72b4603c15","date":"2017-12-05 14:21:26","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if q > a[mid]:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":34772,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:21:36","func_code":"def bsearch(arr, tgt):\n lo = 0\n hi = len(arr)\n while lo <= hi and (low + hi) \/ 2 < len(arr):\n mid = (lo + hi) \/ 2\n if arr[mid] < tgt:\n lo = mid + 1\n else:\n hi = mid - 1\n return (lo + hi) \/ 2","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26307,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-05 14:21:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if q > a[mid]:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3275,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-05 14:21:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if q > a[mid]:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":16256,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:21:49","func_code":"def bsearch(arr, tgt):\n lo = 0\n hi = len(arr)\n while lo <= hi and (lo + hi) \/ 2 < len(arr):\n mid = (lo + hi) \/ 2\n if arr[mid] < tgt:\n lo = mid + 1\n else:\n hi = mid - 1\n return (lo + hi) \/ 2","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18490,"user":"2f42085d-bb24-498f-9d99-42137e03966f","date":"2017-12-05 14:21:50","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":27141,"user":"2f42085d-bb24-498f-9d99-42137e03966f","date":"2017-12-05 14:21:50","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":39896,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:22:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n mid = 0\n i = 0\n if q in a:\n while a[i] != q:\n i += 1\n print(i)\n else:\n while low != high:\n mid = (high + low) \/ 2\n if a[mid] < low:\n high = mid\n else:\n low = mid\n print(low)","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18665,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:22:33","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n while True:\n if high < low:\n return -1\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n return mid","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40418,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:22:35","func_code":"def bsearch(arr, tgt):\n lo = 0\n hi = len(arr)\n while lo <= hi and (lo + hi) \/ 2 < len(arr):\n mid = (lo + hi) \/ 2\n if arr[mid] < tgt:\n lo = mid + 1\n else:\n hi = mid - 1\n return (lo + hi) \/ 2 + 1","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26857,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:22:57","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n i = 0\n if q in a:\n while a[i] != q:\n i += 1\n print(i)","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18240,"user":"d0e5b214-932e-4ec6-ae62-66baacab8b6c","date":"2017-12-05 14:23:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":2156,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-05 14:23:38","func_code":"def bsearch(a, q):\n A = False\n found = A\n newSet = q\n while found != True or newSet > 0:\n midpoint = int(len(newSet) \/ 2)\n if a < newSet[midpoint]:\n found = A\n newSet = newSet[:midpoint]\n elif a > newSet[midpoint]:\n found = A\n newSet = newSet[midpoint:]\n elif a == newSet[midpoint]:\n found = True\n return found","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1327,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:23:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n i = 0\n if q in a:\n while a[i] != q:\n i += 1\n print(i)\n else:\n while low != high:\n mid = (high + low) \/ 2\n if a[mid] < low:\n high = mid\n else:\n low = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":24103,"user":"73d23f7d-b20e-4105-a1b6-6760045cdf33","date":"2017-12-05 14:24:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1518,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:24:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] <= q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13280,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:24:29","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n i = 0\n while low != high:\n mid = (high + low) \/ 2\n if a[mid] < low:\n high = mid\n else:\n low = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":11450,"user":"1d4a4b3b-be4e-49dc-96cc-fceb60ad22a1","date":"2017-12-05 14:24:48","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low == 0 and a[low - 1] < q\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26424,"user":"30a4c165-17bc-4bdf-a096-e2a252a403eb","date":"2017-12-05 14:24:51","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":5086,"user":"73d23f7d-b20e-4105-a1b6-6760045cdf33","date":"2017-12-05 14:25:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13392,"user":"73d23f7d-b20e-4105-a1b6-6760045cdf33","date":"2017-12-05 14:25:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18758,"user":"8487432c-a440-40f5-afcb-ad0e762b9edb","date":"2017-12-05 14:25:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = low\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":28843,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:25:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n i = 0\n while low != high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n high = mid\n else:\n low = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":35635,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:25:36","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n while low != high:\n if high < low:\n return -1\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n return mid","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":23081,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:26:03","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":5603,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:26:03","func_code":"def bsearch(a, t):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < t:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26146,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:26:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n i = 0\n while low != high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n high = mid\n else:\n low = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":30689,"user":"8487432c-a440-40f5-afcb-ad0e762b9edb","date":"2017-12-05 14:26:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = low\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8545,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:26:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":12235,"user":"70e78257-bdc0-4e89-b7cb-a49beaca5b77","date":"2017-12-05 14:26:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26180,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:26:15","func_code":"def bsearch(a, t):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < t:\n low = mid + 1\n else:\n high = mid - 1\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":25654,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:26:27","func_code":"def bsearch(a, t):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < t:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22590,"user":"c7fa847c-561b-4652-9a01-05f954e6c8df","date":"2017-12-05 14:26:27","func_code":"def bsearch(a, t):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < t:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":36171,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-05 14:26:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n else:\n mid = low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":5615,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:26:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n return mid","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":32188,"user":"d0af1b08-7254-49f0-8cc4-d63a85c9199d","date":"2017-12-05 14:26:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":12572,"user":"36685ead-53f8-40af-a908-4c048278dc6b","date":"2017-12-05 14:26:49","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":6227,"user":"36685ead-53f8-40af-a908-4c048278dc6b","date":"2017-12-05 14:26:49","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":37123,"user":"d0af1b08-7254-49f0-8cc4-d63a85c9199d","date":"2017-12-05 14:27:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":28600,"user":"d0af1b08-7254-49f0-8cc4-d63a85c9199d","date":"2017-12-05 14:27:26","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":34883,"user":"d0af1b08-7254-49f0-8cc4-d63a85c9199d","date":"2017-12-05 14:27:26","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":17542,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:27:45","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = low + 1\n else:\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":29094,"user":"30a4c165-17bc-4bdf-a096-e2a252a403eb","date":"2017-12-05 14:27:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8696,"user":"30a4c165-17bc-4bdf-a096-e2a252a403eb","date":"2017-12-05 14:27:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":42340,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-05 14:27:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid + 1] < q:\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n else:\n mid = low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40736,"user":"d0e5b214-932e-4ec6-ae62-66baacab8b6c","date":"2017-12-05 14:28:00","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":37703,"user":"d0e5b214-932e-4ec6-ae62-66baacab8b6c","date":"2017-12-05 14:28:00","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":5174,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-05 14:28:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8544,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-05 14:28:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":39944,"user":"b799d072-e18e-40e6-96cb-77c78c9e2a0f","date":"2017-12-05 14:29:11","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8797,"user":"b799d072-e18e-40e6-96cb-77c78c9e2a0f","date":"2017-12-05 14:29:11","func_code":"def bsearch(a, q):\n high = len(a)\n low = 0\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":7270,"user":"61106f0d-7c7b-4b7a-a3d3-5ba1af9aacf4","date":"2017-12-05 14:30:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if low < q:\n low = mid + 1\n else:\n high = mid\n print(low)","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3173,"user":"831aaa20-0b62-4198-b323-52fc0aa8363b","date":"2017-12-05 14:31:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n m = (low + high) \/ 2\n if a[m] < q:\n low = m + 1\n else:\n high = m\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":818,"user":"831aaa20-0b62-4198-b323-52fc0aa8363b","date":"2017-12-05 14:31:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n m = (low + high) \/ 2\n if a[m] < q:\n low = m + 1\n else:\n high = m\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13540,"user":"5bdbfa0a-a632-46ed-9ff7-06f5062efb09","date":"2017-12-05 14:31:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9407,"user":"5bdbfa0a-a632-46ed-9ff7-06f5062efb09","date":"2017-12-05 14:31:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":23542,"user":"27057d38-c1f9-4b8d-a26e-f287a0546d33","date":"2017-12-05 14:31:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":24190,"user":"27057d38-c1f9-4b8d-a26e-f287a0546d33","date":"2017-12-05 14:31:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3886,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:32:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1975,"user":"0f25ed97-3bfd-4793-bb56-26c57236aeda","date":"2017-12-05 14:32:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n elif a[mid] >= q:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":29982,"user":"0f25ed97-3bfd-4793-bb56-26c57236aeda","date":"2017-12-05 14:32:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n elif a[mid] >= q:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":41657,"user":"16011fd4-f5e2-4c2c-b014-86692ff746d5","date":"2017-12-05 14:32:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":16926,"user":"16011fd4-f5e2-4c2c-b014-86692ff746d5","date":"2017-12-05 14:32:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":17735,"user":"61106f0d-7c7b-4b7a-a3d3-5ba1af9aacf4","date":"2017-12-05 14:33:01","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if low < q:\n low = low + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":23424,"user":"fc726678-a7a5-405b-bc49-844b42ef4a2b","date":"2017-12-05 14:33:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22610,"user":"fc726678-a7a5-405b-bc49-844b42ef4a2b","date":"2017-12-05 14:33:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18754,"user":"8487432c-a440-40f5-afcb-ad0e762b9edb","date":"2017-12-05 14:33:53","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":17037,"user":"8487432c-a440-40f5-afcb-ad0e762b9edb","date":"2017-12-05 14:33:53","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":10061,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-05 14:34:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":10397,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-05 14:34:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":39537,"user":"2b5f9b04-bd61-4108-b289-84a2c1002a82","date":"2017-12-05 14:34:49","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":35037,"user":"a758f933-ec7a-444d-b3d2-f685ac9d9563","date":"2017-12-05 14:35:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":15533,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-05 14:35:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":23632,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-05 14:35:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":16074,"user":"50d273d2-c9d2-425d-a22d-cc7338b6bc3e","date":"2017-12-05 14:35:30","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":41312,"user":"50d273d2-c9d2-425d-a22d-cc7338b6bc3e","date":"2017-12-05 14:35:30","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":16345,"user":"6fb1b046-1d89-4162-8437-722d44e22f50","date":"2017-12-05 14:35:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":4363,"user":"6fb1b046-1d89-4162-8437-722d44e22f50","date":"2017-12-05 14:35:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13167,"user":"2bb8ff82-061d-43cd-a020-a2cffad09d1e","date":"2017-12-05 14:36:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":7995,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-05 14:36:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":41846,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-05 14:36:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1482,"user":"2bb8ff82-061d-43cd-a020-a2cffad09d1e","date":"2017-12-05 14:37:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22713,"user":"2bb8ff82-061d-43cd-a020-a2cffad09d1e","date":"2017-12-05 14:37:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":15504,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:37:09","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":41509,"user":"e65c3029-39bf-4873-8e7a-599cb24be899","date":"2017-12-05 14:37:09","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":6407,"user":"2b5f9b04-bd61-4108-b289-84a2c1002a82","date":"2017-12-05 14:37:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":11114,"user":"2b5f9b04-bd61-4108-b289-84a2c1002a82","date":"2017-12-05 14:37:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":15942,"user":"e3c31dbf-4c63-4e59-aa78-540cb586910e","date":"2017-12-05 14:37:38","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":5090,"user":"e3c31dbf-4c63-4e59-aa78-540cb586910e","date":"2017-12-05 14:37:38","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3209,"user":"61106f0d-7c7b-4b7a-a3d3-5ba1af9aacf4","date":"2017-12-05 14:37:44","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if low < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":19331,"user":"a0677365-0929-4e2e-8719-3729105927cd","date":"2017-12-05 14:38:32","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":12361,"user":"a0677365-0929-4e2e-8719-3729105927cd","date":"2017-12-05 14:38:32","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":28060,"user":"09e5a143-ae3a-4611-8cfa-45d52e07b2c6","date":"2017-12-05 14:38:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":21466,"user":"09e5a143-ae3a-4611-8cfa-45d52e07b2c6","date":"2017-12-05 14:38:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":7558,"user":"c8ff27a3-b9c4-40dd-95d5-68feefbafff7","date":"2017-12-05 14:38:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":887,"user":"c8ff27a3-b9c4-40dd-95d5-68feefbafff7","date":"2017-12-05 14:39:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":37458,"user":"995eab58-b496-45c9-aacf-4878531bfc6f","date":"2017-12-05 14:39:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40720,"user":"07a2a74b-d2da-4f91-ba7e-5881b51fd5e4","date":"2017-12-05 14:40:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40790,"user":"07a2a74b-d2da-4f91-ba7e-5881b51fd5e4","date":"2017-12-05 14:40:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":21787,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:40:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9446,"user":"3299788f-7847-4a87-af83-a4ce95b853ee","date":"2017-12-05 14:40:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":1611,"user":"03ce4b42-26f0-456c-9d48-18c0d16bec55","date":"2017-12-05 14:40:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":29789,"user":"00ee78cc-7a00-47a7-85bb-9c524dad656c","date":"2017-12-05 14:40:11","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22507,"user":"00ee78cc-7a00-47a7-85bb-9c524dad656c","date":"2017-12-05 14:40:11","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":2246,"user":"c8ff27a3-b9c4-40dd-95d5-68feefbafff7","date":"2017-12-05 14:40:22","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid\n else:\n high = mid + 1\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":41793,"user":"c8ff27a3-b9c4-40dd-95d5-68feefbafff7","date":"2017-12-05 14:40:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":19906,"user":"c8ff27a3-b9c4-40dd-95d5-68feefbafff7","date":"2017-12-05 14:40:58","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":11755,"user":"97b1fa02-4c4e-425b-a371-6b1b38862a02","date":"2017-12-05 14:41:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":2219,"user":"97b1fa02-4c4e-425b-a371-6b1b38862a02","date":"2017-12-05 14:41:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":35154,"user":"9ae0539b-3842-4209-9c3e-252c74db087e","date":"2017-12-05 14:41:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40465,"user":"2ff47805-d62a-4ff9-9297-d30f89b68639","date":"2017-12-05 14:41:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n mid = 0\n while low < len(a) and a[low] < q:\n mid = (high + low) \/\/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":true} +{"submission_id":5281,"user":"2ff47805-d62a-4ff9-9297-d30f89b68639","date":"2017-12-05 14:41:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a) - 1\n mid = 0\n while low < len(a) and a[low] < q:\n mid = (high + low) \/\/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":true} +{"submission_id":18313,"user":"995eab58-b496-45c9-aacf-4878531bfc6f","date":"2017-12-05 14:41:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":25172,"user":"995eab58-b496-45c9-aacf-4878531bfc6f","date":"2017-12-05 14:41:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":37761,"user":"9ae0539b-3842-4209-9c3e-252c74db087e","date":"2017-12-05 14:41:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":34501,"user":"9ae0539b-3842-4209-9c3e-252c74db087e","date":"2017-12-05 14:41:46","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8926,"user":"553c9a10-8e3d-401b-8100-2094287197ed","date":"2017-12-05 14:42:00","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n print(q)\n print(a, len(a))\n print(low, high)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n 0\n else:\n 0\n print(q)\n print(a, len(a))\n print(low, mid, high)\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n low = high\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":35920,"user":"553c9a10-8e3d-401b-8100-2094287197ed","date":"2017-12-05 14:43:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n print(q)\n print(a, len(a))\n print(low, high)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n print(q)\n print(a, len(a))\n print(low, mid, high)\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":31740,"user":"f565987c-8fbf-4b95-b405-cf1a3ccac8f5","date":"2017-12-05 14:44:56","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":7657,"user":"f565987c-8fbf-4b95-b405-cf1a3ccac8f5","date":"2017-12-05 14:44:56","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":6685,"user":"553c9a10-8e3d-401b-8100-2094287197ed","date":"2017-12-05 14:45:05","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n print(q)\n print(a, len(a))\n print(low, mid, high)\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":14459,"user":"553c9a10-8e3d-401b-8100-2094287197ed","date":"2017-12-05 14:45:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3128,"user":"553c9a10-8e3d-401b-8100-2094287197ed","date":"2017-12-05 14:45:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low != high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":39584,"user":"7352a7ab-bc53-49d3-8ca7-32aa046fe82d","date":"2017-12-05 14:45:48","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":19696,"user":"61106f0d-7c7b-4b7a-a3d3-5ba1af9aacf4","date":"2017-12-05 14:46:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":30876,"user":"61106f0d-7c7b-4b7a-a3d3-5ba1af9aacf4","date":"2017-12-05 14:46:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22098,"user":"7352a7ab-bc53-49d3-8ca7-32aa046fe82d","date":"2017-12-05 14:46:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":24696,"user":"7352a7ab-bc53-49d3-8ca7-32aa046fe82d","date":"2017-12-05 14:47:09","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":25216,"user":"7352a7ab-bc53-49d3-8ca7-32aa046fe82d","date":"2017-12-05 14:48:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26133,"user":"7352a7ab-bc53-49d3-8ca7-32aa046fe82d","date":"2017-12-05 14:48:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":30539,"user":"7352a7ab-bc53-49d3-8ca7-32aa046fe82d","date":"2017-12-05 14:48:40","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":12485,"user":"91c1f76a-f1ab-4be9-b7ed-6ebaa799aa56","date":"2017-12-05 14:48:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + high \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22392,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 14:49:12","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40400,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 14:49:38","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle\n assert low == 0 or a[low - 1] < q\n else:\n high = middle\n assert high == len(a) or q <= a[high]","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":30633,"user":"7d63d843-7e5d-4c24-a378-1056c311dfd2","date":"2017-12-05 14:50:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return high","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":16756,"user":"7d63d843-7e5d-4c24-a378-1056c311dfd2","date":"2017-12-05 14:50:18","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (high + low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return high","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22622,"user":"91c1f76a-f1ab-4be9-b7ed-6ebaa799aa56","date":"2017-12-05 14:50:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":17648,"user":"91c1f76a-f1ab-4be9-b7ed-6ebaa799aa56","date":"2017-12-05 14:50:25","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = low + (high - low) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":4391,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 14:50:34","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle\n assert low == 0 or a[low - 1] < q\n else:\n high = middle\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":29446,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 14:50:54","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle\n assert low == 0 or a[low - 1] < q\n else:\n high = middle\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9988,"user":"587649dc-83bf-4c24-bb43-de304405f3b9","date":"2017-12-05 14:51:06","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":849,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 14:51:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle\n assert low == 0 or a[low - 1] < q\n else:\n high = middle\n assert high == len(a) or q <= a[high]\n return low[i]","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18192,"user":"a758f933-ec7a-444d-b3d2-f685ac9d9563","date":"2017-12-05 14:51:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18449,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:52:06","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":17821,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:52:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low, high","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9609,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:53:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return mid","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":9872,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:53:30","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return high - low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":25603,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:53:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return len(a)","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":5734,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 14:54:15","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = middle\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":29829,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:54:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":38464,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:54:49","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return high","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":35600,"user":"a758f933-ec7a-444d-b3d2-f685ac9d9563","date":"2017-12-05 14:55:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":5054,"user":"a758f933-ec7a-444d-b3d2-f685ac9d9563","date":"2017-12-05 14:55:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22596,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 14:57:33","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return high - mid","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":37755,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 15:02:33","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = middle\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22475,"user":"1d4a4b3b-be4e-49dc-96cc-fceb60ad22a1","date":"2017-12-05 15:02:36","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q or low == 0\n else:\n high = mid\n assert q <= a[high] or high == len(a)\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":31027,"user":"1d4a4b3b-be4e-49dc-96cc-fceb60ad22a1","date":"2017-12-05 15:02:36","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q or low == 0\n else:\n high = mid\n assert q <= a[high] or high == len(a)\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":8964,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 15:03:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle + 1\n else:\n high = middle\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":28110,"user":"54e7d279-e8ef-49c1-8aea-de3ac0b230cf","date":"2017-12-05 15:03:41","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n middle = (low + high) \/ 2\n if a[middle] < q:\n low = middle + 1\n else:\n high = middle\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":33602,"user":"05bc0114-9d34-4210-bb9b-07af403e11ed","date":"2017-12-05 15:03:52","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n elif a[mid] == q:\n return mid\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":36233,"user":"05bc0114-9d34-4210-bb9b-07af403e11ed","date":"2017-12-05 15:04:47","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n elif a[mid] == q:\n return mid\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":20665,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-05 15:06:08","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":20563,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-05 15:07:00","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26777,"user":"05bc0114-9d34-4210-bb9b-07af403e11ed","date":"2017-12-05 15:07:06","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n elif a[mid] == q:\n return mid\n else:\n high = mid\n assert q <= a[high]\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":31409,"user":"05bc0114-9d34-4210-bb9b-07af403e11ed","date":"2017-12-05 15:07:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":12314,"user":"05bc0114-9d34-4210-bb9b-07af403e11ed","date":"2017-12-05 15:07:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n assert low == 0 or a[low - 1] < q\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13364,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 15:08:36","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":35170,"user":"d0bbdcdf-7e56-44f5-b27d-7b9822c0a1d6","date":"2017-12-05 15:08:36","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":20744,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-05 15:11:37","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":31440,"user":"03ce4b42-26f0-456c-9d48-18c0d16bec55","date":"2017-12-05 15:14:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40065,"user":"03ce4b42-26f0-456c-9d48-18c0d16bec55","date":"2017-12-05 15:14:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid and mid < high\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":41360,"user":"587649dc-83bf-4c24-bb43-de304405f3b9","date":"2017-12-05 15:17:13","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":6683,"user":"587649dc-83bf-4c24-bb43-de304405f3b9","date":"2017-12-05 15:17:13","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert low == 0 or a[low - 1] < q\n else:\n high = mid\n assert high == len(a) or q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":41391,"user":"50aef720-52de-4735-8874-78f5a311b939","date":"2017-12-05 15:21:49","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":32276,"user":"50aef720-52de-4735-8874-78f5a311b939","date":"2017-12-05 15:21:49","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":7046,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-05 15:22:29","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":31512,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-05 15:22:29","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":37933,"user":"f15a871d-61c5-494f-8886-91e213b59201","date":"2017-12-05 15:48:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3893,"user":"f15a871d-61c5-494f-8886-91e213b59201","date":"2017-12-05 15:48:20","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":901,"user":"dd2b828e-e813-417d-b910-df48d2f89ccc","date":"2017-12-05 16:36:56","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n search = (high + low) \/ 2\n if a[search] == q:\n return True\n elif a[search] > q:\n high = search\n else:\n low = search\n if low == search:\n low += 1\n return False","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":32045,"user":"dd2b828e-e813-417d-b910-df48d2f89ccc","date":"2017-12-05 16:46:24","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n search = (high + low) \/ 2\n if a[search] == q:\n return search\n elif a[search] > q:\n high = search\n else:\n low = search\n if low == search:\n low += 1\n return search","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18329,"user":"dd2b828e-e813-417d-b910-df48d2f89ccc","date":"2017-12-05 16:49:07","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n search = (high + low) \/ 2\n while high != low and a[search] != q:\n search = (high + low) \/ 2\n if a[search] > q:\n high = search\n else:\n low = search\n if low == search:\n low += 1\n return search","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18328,"user":"0964a543-93db-460b-a0c5-d0c94fea250f","date":"2017-12-05 16:52:53","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26881,"user":"dd2b828e-e813-417d-b910-df48d2f89ccc","date":"2017-12-05 16:53:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while high != low:\n search = (high + low) \/ 2\n if a[search] == q and a[search - 1] != q:\n return search\n elif a[search] > q:\n high = search\n else:\n low = search\n if low == search:\n low += 1\n return search","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":22449,"user":"05bf8435-64be-48cb-be81-139956827989","date":"2017-12-05 17:10:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":10331,"user":"dd2b828e-e813-417d-b910-df48d2f89ccc","date":"2017-12-05 17:18:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n search = (high + low) \/ 2\n assert low <= search < high\n if a[search] < q:\n low = search + 1\n assert a[low - 1] < q\n else:\n high = search\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":10810,"user":"dd2b828e-e813-417d-b910-df48d2f89ccc","date":"2017-12-05 17:18:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n search = (high + low) \/ 2\n assert low <= search < high\n if a[search] < q:\n low = search + 1\n assert a[low - 1] < q\n else:\n high = search\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":6963,"user":"05bf8435-64be-48cb-be81-139956827989","date":"2017-12-05 18:34:51","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":32890,"user":"05bf8435-64be-48cb-be81-139956827989","date":"2017-12-05 18:34:51","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":18419,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-12-05 20:19:13","func_code":"def intersection(a, b):\n seen = {}\n appended = {}\n c = []\n i = 0\n while i < len(a):\n seen[a[i]] = True\n i = i + 1\n i = 0\n while i < len(b):\n if b[i] in seen and b[i] not in appended:\n c.append(b[i])\n appended[b[i]] = True\n i = i + 1\n return c","func_name":"intersection","assignment_id":"intersection","academic_year":2016,"module":"ca277","description":"Return the intersection between two lists.","test":"assert intersection([],[])==[] and intersection([20052, 20052, -9991],[102, 20052, -9991])==[20052, -9991] and intersection([38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794],[38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794])==[38908273694008580353068229963801163341, 59, -38, 28239, -2723, 24559, -5794]","correct":true} +{"submission_id":19594,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-12-05 20:19:13","func_code":"def intersection(a, b):\n seen = {}\n appended = {}\n c = []\n i = 0\n while i < len(a):\n seen[a[i]] = True\n i = i + 1\n i = 0\n while i < len(b):\n if b[i] in seen and b[i] not in appended:\n c.append(b[i])\n appended[b[i]] = True\n i = i + 1\n return c","func_name":"intersection","assignment_id":"intersection","academic_year":2016,"module":"ca277","description":"Return the intersection between two lists.","test":"assert intersection([],[])==[] and intersection([20052, 20052, -9991],[102, 20052, -9991])==[20052, -9991] and intersection([38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794],[38908273694008580353068229963801163341, 59, 38908273694008580353068229963801163341, -38, 28239, -2723, 24559, -5794])==[38908273694008580353068229963801163341, 59, -38, 28239, -2723, 24559, -5794]","correct":true} +{"submission_id":34098,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-12-05 20:19:13","func_code":"def union(a, b):\n a = a + b\n seen = {}\n c = []\n i = 0\n while i < len(a):\n if a[i] not in seen:\n c.append(a[i])\n seen[a[i]] = True\n i = i + 1\n return c","func_name":"union","assignment_id":"union","academic_year":2016,"module":"ca277","description":"Merge two lists into a single one.","test":"assert union([],[])==[] and union([25785],[25785])==[25785] and union([-90, 21135, 29310, -8059, 7114, -90, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996],[5, -9316, 7379237229304681733])==[-90, 21135, 29310, -8059, 7114, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996, 5, -9316, 7379237229304681733]","correct":true} +{"submission_id":4021,"user":"b588e248-0a0b-40c1-ad90-f9fc1d050dd0","date":"2017-12-05 20:19:13","func_code":"def union(a, b):\n a = a + b\n seen = {}\n c = []\n i = 0\n while i < len(a):\n if a[i] not in seen:\n c.append(a[i])\n seen[a[i]] = True\n i = i + 1\n return c","func_name":"union","assignment_id":"union","academic_year":2016,"module":"ca277","description":"Merge two lists into a single one.","test":"assert union([],[])==[] and union([25785],[25785])==[25785] and union([-90, 21135, 29310, -8059, 7114, -90, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996],[5, -9316, 7379237229304681733])==[-90, 21135, 29310, -8059, 7114, -5808, 1333, -18691, 7, -19450, 67745575129021321678860432754396203799, -9288, -161403197171354040520992237328119268342, 49, 120528818203287557, 133011337445419463191476642795673848676, 11952, 11996, 5, -9316, 7379237229304681733]","correct":true} +{"submission_id":14097,"user":"334b0f61-5fa3-43cf-8691-29f975dd7270","date":"2017-12-05 20:58:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":39368,"user":"334b0f61-5fa3-43cf-8691-29f975dd7270","date":"2017-12-05 20:58:04","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3393,"user":"0964a543-93db-460b-a0c5-d0c94fea250f","date":"2017-12-05 21:53:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":40653,"user":"0964a543-93db-460b-a0c5-d0c94fea250f","date":"2017-12-05 21:53:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":14829,"user":"0964a543-93db-460b-a0c5-d0c94fea250f","date":"2017-12-05 21:53:35","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":10375,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-05 22:00:32","func_code":"def walkback(a, q, i):\n while i > 1 and a[i - 1] == q:\n i -= 1\n return i\n\n\ndef bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n guess = low + (high - low) \/ 2\n if a[guess] == q:\n return walkback(a, q, guess)\n elif a[guess] < q:\n low = guess + 1\n else:\n high = guess - 1\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":23915,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-05 22:12:07","func_code":"def walkback(a, q, i):\n while i > 1 and a[i - 1] == q:\n i -= 1\n return i\n\n\ndef bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n guess = low + (high - low) \/\/ 2\n if a[guess] == q:\n return walkback(a, q, guess)\n elif a[guess] < q:\n low = guess + 1\n else:\n high = guess\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":true} +{"submission_id":26553,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-05 22:14:02","func_code":"def walkback(a, q, i):\n while i > 0 and a[i - 1] == q:\n i -= 1\n return i\n\n\ndef bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n guess = low + (high - low) \/\/ 2\n if a[guess] == q:\n return walkback(a, q, guess)\n elif a[guess] < q:\n low = guess + 1\n else:\n high = guess\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":true} +{"submission_id":41336,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-05 22:14:02","func_code":"def walkback(a, q, i):\n while i > 0 and a[i - 1] == q:\n i -= 1\n return i\n\n\ndef bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n guess = low + (high - low) \/\/ 2\n if a[guess] == q:\n return walkback(a, q, guess)\n elif a[guess] < q:\n low = guess + 1\n else:\n high = guess\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":true} +{"submission_id":253,"user":"0d8d49aa-e213-4ab4-bcc1-440a0397585c","date":"2017-12-06 01:05:56","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":6317,"user":"0d8d49aa-e213-4ab4-bcc1-440a0397585c","date":"2017-12-06 01:05:56","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < a\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":20434,"user":"f278f0d6-3389-497b-a30b-f0d8ecebb7e1","date":"2017-12-06 11:34:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":35842,"user":"f278f0d6-3389-497b-a30b-f0d8ecebb7e1","date":"2017-12-06 11:36:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3824,"user":"f278f0d6-3389-497b-a30b-f0d8ecebb7e1","date":"2017-12-06 11:36:10","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26776,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 11:45:16","func_code":"def double(n):\n n = n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":4877,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 11:46:05","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":1903,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 11:57:31","func_code":"def circumference(r):\n return 2 * 3.141 * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":18137,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 11:57:31","func_code":"def area(r):\n return 3.141 * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":7441,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 11:58:13","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":37125,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 11:58:13","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26901,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 11:58:17","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15080,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 11:58:17","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":23898,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 11:58:17","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":28307,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 11:58:17","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":540,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 12:03:03","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":11347,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-06 12:03:03","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":4193,"user":"86f3bfd9-abca-4a94-ac95-d257d354e3e5","date":"2017-12-06 12:03:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":35750,"user":"86f3bfd9-abca-4a94-ac95-d257d354e3e5","date":"2017-12-06 12:03:42","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n assert low <= mid < high\n if a[mid] < q:\n low = mid + 1\n assert a[low - 1] < q\n else:\n high = mid\n assert q <= a[high]\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":29289,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-12-06 12:23:39","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":10588,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-12-06 12:28:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":38791,"user":"32a14d12-9054-46cd-aa7e-4bf97d33fa10","date":"2017-12-06 12:28:31","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":21960,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-12-06 12:43:28","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":13031,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-12-06 12:56:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":3861,"user":"48db4273-a21e-41be-bca6-9b6444a15cbf","date":"2017-12-06 12:56:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":36210,"user":"fc726678-a7a5-405b-bc49-844b42ef4a2b","date":"2017-12-06 15:18:12","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":24632,"user":"fc726678-a7a5-405b-bc49-844b42ef4a2b","date":"2017-12-06 15:18:12","func_code":"def reverse(a):\n a = a[::-1]\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":22252,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 15:33:00","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":23534,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 15:33:00","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25507,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 16:16:57","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":8622,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 16:16:57","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":23208,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 16:17:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return\n\n\ndef reverse(a):\n return swap(a, 2, 3)","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":22809,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 16:19:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return\n\n\ndef reverse(a):\n return swap(a, 2, 3)","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":35358,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 16:19:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return\n\n\ndef reverse(a):\n return swap(a, 2, 3)","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":34060,"user":"68f143f9-a076-4b95-afe1-e3828c2d0f4e","date":"2017-12-06 16:19:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return\n\n\ndef reverse(a):\n return swap(a, 2, 3)","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":22204,"user":"35d18426-1565-4cbc-afa0-82ff8cbc8cbd","date":"2017-12-06 16:35:00","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":8809,"user":"35d18426-1565-4cbc-afa0-82ff8cbc8cbd","date":"2017-12-06 16:35:00","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":9095,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-06 17:33:41","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, a[i], a[len(a) - i - 1])\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":5185,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-06 17:34:17","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, a[i], a[len(a) - i - 1])\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":41125,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-06 17:37:54","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - i - 1\n swap(a, i, j)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":25428,"user":"213d8254-d887-4b88-8234-2f2edbe536aa","date":"2017-12-06 17:37:54","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n return a\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - i - 1\n swap(a, i, j)\n i = i + 1\n return a","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":true} +{"submission_id":41868,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-06 18:18:08","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n min_ind = i\n while j < len(a):\n if a[j] < a[min_ind]:\n min_ind = j\n j += 1\n tmp = a[i]\n a[i] = a[min_ind]\n a[min_ind] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":8942,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-06 18:18:08","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n min_ind = i\n while j < len(a):\n if a[j] < a[min_ind]:\n min_ind = j\n j += 1\n tmp = a[i]\n a[i] = a[min_ind]\n a[min_ind] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":35216,"user":"733076ff-a42d-4d8b-82c9-5fbbffc0c400","date":"2017-12-06 18:18:08","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n min_ind = i\n while j < len(a):\n if a[j] < a[min_ind]:\n min_ind = j\n j += 1\n tmp = a[i]\n a[i] = a[min_ind]\n a[min_ind] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":3167,"user":"35d18426-1565-4cbc-afa0-82ff8cbc8cbd","date":"2017-12-06 18:31:41","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":11533,"user":"35d18426-1565-4cbc-afa0-82ff8cbc8cbd","date":"2017-12-06 18:31:41","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":10551,"user":"35d18426-1565-4cbc-afa0-82ff8cbc8cbd","date":"2017-12-06 18:31:41","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":8770,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:42:53","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":41396,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:42:53","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13651,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:45:32","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":1877,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:45:54","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":3776,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:45:54","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":12337,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:45:54","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":29198,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:45:54","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":836,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:48:33","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n print(len(a) - i)","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":28000,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:48:45","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n print(len(a) - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":24882,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:49:04","func_code":"def reverse(a):\n i = 0\n while i < len(a):\n print(len(a) - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":10894,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:50:29","func_code":"def reverse(a):\n i = 1\n while i < len(a):\n print(len(a) - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":11802,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:53:56","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":32589,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 19:53:56","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":20110,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 20:00:33","func_code":"def selection_sort(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":26468,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 20:01:55","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":16723,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 20:01:55","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":22304,"user":"6a72520c-4c39-4c03-b7cf-5550dbde3147","date":"2017-12-06 20:01:55","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":true} +{"submission_id":12105,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-06 20:29:02","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":37958,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-06 20:29:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":26158,"user":"4a1f2726-b713-40f0-b544-9de55d617a12","date":"2017-12-06 20:29:43","func_code":"def bsearch(a, q):\n low = 0\n high = len(a)\n while low < high:\n mid = (low + high) \/ 2\n if a[mid] < q:\n low = mid + 1\n else:\n high = mid\n return low","func_name":"bsearch","assignment_id":"bsearch","academic_year":2016,"module":"ca116","description":"Search for element q in the sorted array a.","test":"assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3","correct":false} +{"submission_id":21305,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-07 00:24:25","func_code":"def double(n):\n n = a * 2\n return n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":21986,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-07 00:24:41","func_code":"def double(n):\n a = n * 2\n return a","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13134,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-07 00:24:41","func_code":"def double(n):\n a = n * 2\n return a","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":40322,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-07 00:28:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":32210,"user":"c0d569cd-4374-4e65-8e98-e814031fb3ca","date":"2017-12-07 00:28:30","func_code":"def swap(a, i, j):\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":10962,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 00:41:59","func_code":"def double(n):\n print(2 * n)","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":20797,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 00:45:54","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":39957,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 00:45:54","func_code":"def double(n):\n return 2 * n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":8145,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 00:59:17","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":24254,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 00:59:17","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":15666,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 00:59:17","func_code":"def circumference(r):\n return 2 * pi * r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":26632,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 00:59:17","func_code":"def area(r):\n return pi * r ** 2","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":6085,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 01:18:48","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":10214,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 01:18:48","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n swap(a, i, j)\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":568,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:11:42","func_code":"def double(n):\n n = n * 2\n return n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":10497,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:18:53","func_code":"def area(r):\n r = r ** 2\n a = 2 * 3.141 * r\n return a","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":22387,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:18:53","func_code":"def circumference(r):\n a = 2 * 3.141 * r\n return a","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":14113,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:22:15","func_code":"def circumference(r):\n r = 2 * 3.141 * r\n return r","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":7839,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:22:15","func_code":"def area(r):\n r = r ** 2\n r = 3.141 * r\n return r","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":9784,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:23:17","func_code":"def circumference(r):\n a = 2 * pi * r\n return a","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":10796,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:23:17","func_code":"def area(r):\n r = r ** 2\n a = pi * r\n return a","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":25376,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:23:17","func_code":"def circumference(r):\n a = 2 * pi * r\n return a","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":32189,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:23:17","func_code":"def area(r):\n r = r ** 2\n a = pi * r\n return a","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":36280,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-07 10:24:06","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":1775,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-07 10:24:06","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":30825,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:45:03","func_code":"def reverse(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if int(a[j]) > int(a[p]):\n p = j\n j = j + 1\n return p","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":12963,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 10:46:40","func_code":"def reverse(a):\n p = i\n j = i + 1\n while j < len(a):\n if int(a[j]) > int(a[p]):\n p = j\n j = j + 1\n return p","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":13703,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-07 10:51:50","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":1496,"user":"87fe2a11-c843-4db7-a092-fa2c47cf613f","date":"2017-12-07 10:51:50","func_code":"def reverse(a):\n i = 0\n j = len(a) - 1\n while i < len(a) \/ 2:\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n i = i + 1\n j = j - 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":21366,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 10:53:56","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":3411,"user":"e0141b22-9477-459d-8e1c-18f5d5ef6624","date":"2017-12-07 10:53:56","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":5494,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 11:07:11","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":15253,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 11:07:11","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - 1 - i)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":21969,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 11:26:30","func_code":"def double(n):\n y = n * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":10942,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 11:26:30","func_code":"def double(n):\n y = n * 2\n return y","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":29703,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 11:28:52","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":9698,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 11:28:52","func_code":"def area(r):\n x = (pi * r) ** 2\n return x","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":18555,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 11:29:17","func_code":"def area(r):\n x = pi * r ** 2\n return x","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":18763,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 11:29:17","func_code":"def area(r):\n x = pi * r ** 2\n return x","func_name":"area","assignment_id":"func_circle.py_ca116_area","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":22581,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 11:29:17","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":6078,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 11:29:17","func_code":"def circumference(r):\n y = 2 * pi * r\n return y","func_name":"circumference","assignment_id":"func_circle.py_ca116_circumference","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":1859,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 11:34:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":31016,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 11:34:22","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, len(a) - i - 1)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":3930,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:11:28","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - i - 1\n swap(a, i, j)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":26045,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:11:28","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n j = len(a) - i - 1\n swap(a, i, j)\n i = i + 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":39687,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:19:00","func_code":"def selection_sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":170,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:19:55","func_code":"def selection_sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":2231,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:20:31","func_code":"def selection_sort(a):\n i = 0\n j = i + 1\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":27033,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:20:46","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":25534,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:21:35","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":5354,"user":"24b328b2-2b24-43bc-9468-d9ba1d7df521","date":"2017-12-07 12:21:35","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n j = i + 1\n while j < len(a):\n if a[j] < a[i]:\n tmp = a[j]\n a[j] = a[i]\n a[i] = tmp\n j = j + 1\n i = i + 1\n return a","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":10282,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:43:16","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n j = p\n j = j + 1\n i = i + 1\n swap(a, i, p)","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":7068,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:48:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n smallest_element(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":29981,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:49:43","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n smallest_element(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":174,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:50:46","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest_element(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":41676,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:51:48","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest_element(a, i)\n swap(a, i, j)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":32771,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:52:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest_element(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":39126,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:53:07","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[p] < a[j]:\n j = p\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest_element(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":6352,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:53:26","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest_element(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":35226,"user":"da1464fe-2ccb-4c4e-b174-962f2177debd","date":"2017-12-07 12:53:26","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef smallest_element(a, i):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j = j + 1\n return p\n\n\ndef selection_sort(a):\n i = 0\n while i < len(a):\n p = smallest_element(a, i)\n swap(a, i, p)\n i = i + 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":17457,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 19:32:39","func_code":"def double(n):\n n = n * 2\n return n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":16573,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 19:32:39","func_code":"def double(n):\n n = n * 2\n return n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":31713,"user":"e4dcdad8-3da9-41c5-bbd1-3df3433e270d","date":"2017-12-07 19:32:39","func_code":"def double(n):\n n = n * 2\n return n","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":13369,"user":"8fca450a-2117-453b-8f1b-f55a98c9bdb9","date":"2017-12-13 15:13:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, -i - 1)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":39902,"user":"8fca450a-2117-453b-8f1b-f55a98c9bdb9","date":"2017-12-13 15:13:14","func_code":"def swap(a, i, j):\n tmp = a[i]\n a[i] = a[j]\n a[j] = tmp\n\n\ndef reverse(a):\n i = 0\n while i < len(a) \/ 2:\n swap(a, i, -i - 1)\n i += 1","func_name":"reverse","assignment_id":"reverse_by_swap","academic_year":2016,"module":"ca116","description":"Reverse a list of elements by swapping its elements.","test":"assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]]","correct":false} +{"submission_id":38337,"user":"8fca450a-2117-453b-8f1b-f55a98c9bdb9","date":"2017-12-13 15:13:20","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":11771,"user":"8fca450a-2117-453b-8f1b-f55a98c9bdb9","date":"2017-12-13 15:13:20","func_code":"def selection_sort(a):\n i = 0\n while i < len(a):\n p = i\n j = i + 1\n while j < len(a):\n if a[j] < a[p]:\n p = j\n j += 1\n tmp = a[p]\n a[p] = a[i]\n a[i] = tmp\n i += 1","func_name":"selection_sort","assignment_id":"selection_sort","academic_year":2016,"module":"ca116","description":"Sort a list by repeatedly move minimimum of remaining sublist to front.","test":"assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204]","correct":false} +{"submission_id":20886,"user":"8fca450a-2117-453b-8f1b-f55a98c9bdb9","date":"2017-12-13 15:15:21","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":19678,"user":"8fca450a-2117-453b-8f1b-f55a98c9bdb9","date":"2017-12-13 15:15:21","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true} +{"submission_id":305,"user":"8fca450a-2117-453b-8f1b-f55a98c9bdb9","date":"2017-12-13 15:15:21","func_code":"def double(n):\n return n * 2","func_name":"double","assignment_id":"func_double.py_ca116_double","academic_year":2016,"module":"ca116","description":null,"test":"","correct":true}